Predicted image generation device, image decoding device, and image encoding device

ABSTRACT

In DBBP, there is a problem because of a large processing amount of a synthesis process in which two complement images are synthesized according to segmentation and a filtering process is executed. A predicted image generation device includes a segmentation derivation section that derives segmentation information from an image; and an image synthesis section that generates a predicted image. The image synthesis section executes a filtering process based on a partition mode and the segmentation information.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a Continuation of copending application Ser. No.15/319,668, filed on Dec. 16, 2016, which is the National Phase under 35U.S.C. § 371 of International Application No. PCT/JP2015/067787, filedon Jun. 19, 2015, which claims the benefit under 35 U.S.C. § 119(a) toPatent Application No. 2014-126219, filed in Japan on Jun. 19, 2014, allof which are hereby expressly incorporated by reference into the presentapplication.

TECHNICAL FIELD

The present invention relates to an image decoding device, an imagecoding device, and a predicted image generation device.

BACKGROUND ART

In image coding techniques for multiple-viewpoint images, disparityprediction coding that reduces the amount of information by predictingdisparity between images at the time of coding of multiple-viewpointimages and decoding methods corresponding to the coding methods havebeen proposed. A vector indicating disparity between viewpoint images isreferred to as a disparity vector. A disparity vector is a 2-dimensionalvector that has a component (x component) in the horizontal directionand a component (y component) in the vertical direction and iscalculated for each block which is a region obtained by splitting oneimage. To acquire multiple-viewpoint images, it is general to usecameras disposed at respective viewpoints. In coding formultiple-viewpoint images, viewpoint images are coded as differentlayers in a plurality of layers. A coding method for a moving imageformed in a plurality of layers is generally referred to as scalablecoding or hierarchical coding. In scalable coding, high codingefficiency is realized by executing prediction between layers. A layerserving as a standard layer, which is not used in prediction betweenlayers, is referred to as a base layer and other layers are referred toas enhancement layers. In a case where layers are formed from viewpointimages, scalable coding is referred to as view scalable coding. At thistime, a base layer is also referred to as a base view and an enhancementlayer is also referred to as a non-base view. Further, in addition toview scalable coding, scalable coding is referred to as 3-dimensionalscalable coding in a case where layers are formed from a texture layer(image layer) and a depth layer (distance image layer).

In scalable coding, there are spatial scalable coding (in which apicture with a low resolution is processed as a base layer and a picturewith a high resolution is processed as an enhancement layer), SNRscalable coding (in which a picture with a low resolution is processedas a base layer and a picture with a high resolution is processed as anenhancement layer), and the like as well as view scalable coding. In thescalable coding, for example, a picture of the base layer is used as areference picture in coding for a picture of an enhancement layer insome cases.

In NPL 1, there is known a technique called depth-based blockpartitioning (DBBP) for deriving partition information (segmentation)from depth and synthesizing one predicted image from two interpolatedimages using the segmentation as a mask. In the DBBP, by derivingsegmentation from region partition based on pixels of depth, thepartition with the high degree of freedom is possible without beinglimited to rectangles (2N×2N, 2N×N, 2N×nU, 2N×nD, N×2N, nL×2N, andnR×2N).

In NPL 2, in a blending process for the DBBP, coding efficiency isimproved by using horizontal and vertical filtering processes together.

CITATION LIST Non Patent Literature

-   NPL 1: F. Jager, J. Konieczny, and G. Cordara, “CE3: Results on    Depth-based Block Partitioning (DBBP)”, JCT3V-G0106, JCT-3V 7th    Meeting: San Jose, USA, 11 January. to 17 Jan. 2013 (disclosed on    Jan. 3, 2014)-   NPL 2: J. Y. Lee, M. Mishurovskiy, M. W. Park, C. Kim, “Partition    boundary filtering in DBBP”, JCT3V-H0104, JCT-3V 8th Meeting:    Valencia, ES, 29 March to 4 Apr. 2014 (disclosed on Mar. 21, 2014)

SUMMARY OF INVENTION Technical Problem

In the DBBP synthesis process of NPL 1 and the DBBP filter of NPL 2, adifference in segmentation between each pixel on a block and adjacentpixels is determined on four top, bottom, right, and left adjacentpixels and a blending or filtering process is executed. Therefore, thereis a problem that the determination process and the blending process arecomplicated.

Solution to Problem

According to an aspect of the invention, a predicted image generationdevice includes a segmentation derivation section that derivessegmentation information from an image and an image synthesis sectionthat generates a predicted image. The image synthesis section executes afiltering process based on a partition mode and the segmentationinformation.

Advantageous Effects of Invention

According to the invention, it is possible to obtain the advantageouseffect of reducing a processing amount of a synthesis process in whichtwo complement images are synthesized according to segmentation and afiltering process is executed in DBBP while maintaining codingefficiency.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a block diagram illustrating the configuration of a DBBPprediction section 3095 according to an embodiment.

FIG. 2 is a schematic diagram illustrating the configuration of an imagetransmission system according to an embodiment of the invention.

FIG. 3 is a diagram illustrating a hierarchical structure of data of acoded stream according to the embodiment of the invention.

FIG. 4 is a diagram illustrating patterns of partition modes and FIGS.4(a) to 4(h) illustrate partition shapes in a case of the partitionmodes 2N×2N, 2N×N, 2N×nU, 2N×nD, N×2N, nL×2N, nR×2N, and N×N,respectively.

FIG. 5 is a conceptual diagram illustrating an example of a referencepicture list.

FIG. 6 is a conceptual diagram illustrating an example of a referencepicture.

FIG. 7 is a schematic diagram illustrating the configuration of an imagedecoding device 31 according to the embodiment.

FIG. 8 is a schematic diagram illustrating the configuration of aninter-prediction parameter decoding section 303 according to theembodiment.

FIG. 9 is a schematic diagram illustrating the configuration of a mergemode parameter derivation section 3036 according to the embodiment.

FIG. 10 is a schematic diagram illustrating the configuration of an AMVPprediction parameter derivation section 3032 according to theembodiment.

FIG. 11 is a diagram illustrating an example of a merge candidate list.

FIG. 12 is a diagram illustrating the positions of adjacent blocks towhich spatial merge candidates refer.

FIG. 13 is a diagram illustrating depth reference positions inderivation of the splitting flag in the partition mode according to theembodiment.

FIG. 14 is a diagram illustrating the configuration of a VSP mergecandidate derivation section 30374 (VSP prediction section 30374)according to the embodiment.

FIG. 15 is a schematic diagram illustrating the configuration of theinter-prediction parameter decoding control section 303 according to thefirst embodiment.

FIG. 16 is a schematic diagram illustrating the configuration of aninter-predicted image generation section 309 according to theembodiment.

FIG. 17 is a schematic diagram illustrating the configuration of aresidual prediction section 3092 according to the embodiment.

FIG. 18 is a conceptual diagram illustrating residual prediction (a caseof a motion vector) according to the embodiment.

FIG. 19 is a conceptual diagram illustrating residual prediction (in acase of a parallax vector) according to the embodiment.

FIG. 20 is a syntax table illustrating a DBBP flag dbbp_flag accordingto the embodiment.

FIG. 21 is a diagram illustrating an image synthesis section 30953according to the embodiment.

FIG. 22 is a block diagram illustrating the configuration of an imagecoding device 11 according to the embodiment.

FIG. 23 is a schematic diagram illustrating the configuration of aninter-prediction parameter coding section 112 according to theembodiment.

DESCRIPTION OF EMBODIMENTS

Hereinafter, an embodiment of the present invention will be describedwith reference to the drawings.

FIG. 2 is a schematic diagram illustrating the configuration of an imagetransmission system 1 according to the embodiment.

The image transmission system 1 is a system that transmits codesobtained by coding a plurality of layer images and displays imagesobtained by decoding the transmitted codes. The image transmissionsystem 1 is configured to include an image coding device 11, a network21, an image decoding device 31, and an image display device 41.

Signals T indicating a plurality of layer images (also referred to astexture images) are input to the image coding device 11. The layerimages are images viewed or captured at certain resolutions and certainviewpoints. In a case where view scalable coding of coding a3-dimensional image using a plurality of layer images is executed, eachof the plurality of layer images is referred to as a view image. Here,the viewpoint corresponds to an observation point or the position of animaging device. For example, a plurality of viewpoint images are imagesobtained when right and left imaging devices image an object. The imagecoding device 11 codes the signals to generate coded streams Te (codeddata). The details of the coded streams Te will be described below. Theviewpoint image is a 2-dimensional image (planar image) observed at acertain viewpoint. The viewpoint image is expressed with, for example, aluminance value or a color signal value of each of the pixels arrayed ina 2-dimensional plane. Hereinafter, one viewpoint image or a signalindicating the viewpoint image is referred to as a picture. In a casewhere spatial scalable coding is executed using a plurality of layerimages, the plurality of layer images are formed of a base layer imagewith a low resolution and enhancement layer images with highresolutions. In a case where SNR scalable coding is executed using aplurality of layer images, the plurality of layer images are formed of abase layer image with low quality and enhancement layer images with highquality. The view scalable coding, the spatial scalable coding, and theSNR scalable coding may be combined arbitrarily. In the embodiment,coding and decoding of images including at least a base layer image andimages (enhancement layer images) other than the base layer image as aplurality of layer images are treated. An image on a referred side intwo layers having a reference relation (dependency relation) in imagesor coding parameters among a plurality of layers is referred to as afirst layer image and an image on a referring side is referred to as asecond layer image. For example, in a case where there is an enhancementlayer image (other than a base layer) coded referring to the base layer,the base layer image is treated as the first layer image and anenhancement layer image is treated as a second layer image. As anexample of the enhancement layer image, there is a viewpoint image or adepth image other than a base view.

A depth image (also referred to as a depth map or a “distance image”) isa signal value (referred to as a “depth value” or a “depth”corresponding to a distance of an object or a background contained in anobject plane from a viewpoint (an imaging device or the like) and is animage signal formed from a signal value (pixel value) of each of thepixels arrayed in a 2-dimensional plane. The pixels forming a depthimage correspond to the pixels forming a viewpoint image. Accordingly,the depth map serves as a clue for expressing a 3-dimensional objectplane using a viewpoint image which is an image signal serving as astandard in which an object plane is projected to a 2-dimensional plane.

The network 21 transmits the coded streams Te generated by the imagecoding device 11 to the image decoding device 31. The network 21 is theInternet, a wide area network (WAN), a local area network (LAN), or acombination thereof. The network 21 is not necessarily limited to abi-directional communication network, but may be a uni-directional orbi-directional communication network in which broadcast waves ofterrestrial digital broadcast or satellite broadcast are transmitted.The network 21 may be substituted with a storage medium that stores thecoded streams Te, such as a digital versatile disc (DVD) or a Blu-ray(BD) disc.

The image decoding device 31 decodes the coded streams Te transmitted bythe network 21 to generate a plurality of decoded layer images Td(decoded viewpoint images Td).

The image display device 41 displays some or all of the plurality ofdecoded layer images Td generated by the image decoding device 31. Forexample, in the view scalable coding, in the case where all of thedecoded layer images are displayed, 3-dimensional images (stereoscopicimages) or free viewpoint images are displayed. In the case where someof the decoded layer images are displayed, 2-dimensional images aredisplayed. The image display device 41 includes, for example, a displaydevice such as a liquid crystal display or an organicelectro-luminescence (EL) display. In the spatial scalable coding andthe SNR scalable coding, in a case where the image decoding device 31and the image display device 41 have a high processing capability,enhancement layer images with high quality are displayed. In a casewhere the image decoding device 31 and the image display device 41 havea lower processing capability, base layer images for which a processingcapability or a display capability is not necessary in an enhancementlayer are displayed.

<Structure of Coded Stream Te>

The data structure of the coded stream Te generated by the image codingdevice 11 and decoded by the image decoding device 31 will be describedbefore the image coding device 11 and the image decoding device 31according to the embodiment are described.

FIG. 3 is a diagram illustrating the hierarchical structure of data ofthe coded stream Te. The coded stream Te includes, for example, asequence and a plurality of pictures forming the sequence. FIGS. 3(a) to3(f) are diagrams illustrating a sequence layer establishing a sequenceSEQ, a picture layer defining pictures PICT, a slice layer definingslices S, a slice data layer defining slice data, a coding tree layerdefining a coding tree unit included in slice data, and a coding unitlayer defining a coding unit (CU) included in a coding tree,respectively.

(Sequence Layer)

In the sequence layer, a set of data which is referred to by the imagedecoding device 31 is defined to decode the processing target sequenceSEQ (hereinafter also referred to as a target sequence). As illustratedin FIG. 3(a), the sequence SEQ includes a video parameter set, asequence parameter set (SPS), a picture parameter set PPS, picturePICTs, and supplemental enhancement information (SEI). Here, a valuesuffixed after # indicates a layer ID (nuh_layer_id). In FIG. 3, anexample in which there is coded data of #0 and #1, that is, layer 0 andlayer 1, is illustrated, but the kinds of layers and the number oflayers are not limited thereto.

In the video parameter set VPS, a set of coding parameters common to aplurality of moving images in a moving image formed by a plurality oflayers and a set of coding parameters related to the plurality of layersand an individual layer included in the moving image are defined.

In the sequence parameter set SPS, a set of coding parameters which arereferred to by the image decoding device 31 to decode the targetsequence is defined. For example, the width or the height of a pictureis defined.

In the picture parameter set PPS, a set of coding parameters which arereferred to by the image decoding device 31 to decode each picture in atarget sequence is defined. For example, a standard value(pic_init_qp_minus26) of a quantization width used to decode a pictureor a flag (weighted_pred_flag) indicating application of weightedprediction are included. There may be a plurality of PPSs. In this case,any of the plurality of PPSs is selected from each picture in the targetsequence.

(Picture Layer)

In the picture layer, a set of data which is referred to by the imagedecoding device 31 to decode a processing target picture PICT(hereinafter also referred to as a target picture) is defined. Asillustrated in FIG. 3(b), the picture PICT includes slices S0 to SNS-1(where NS is a total number of slices included in the picture PICT).

Hereinafter, in a case where it is not necessary to distinguish theslices S0 to SNS-1 from each other, the suffixes of the referencenumerals are omitted in description in some cases. The same also appliesdata which is included in the coded stream Te to be described below andother data to which suffixes are attached.

(Slice Layer)

In the slice layer, a set of data which is referred to by the imagedecoding device 31 to decode a processing target slice S (also referredto as a target slice) is defined. As illustrated in FIG. 3(c), the sliceS includes a slice header SH and slice data SDATA.

The slice header SH include a coding parameter group which is referredto by the image decoding device 31 to decide a target slice decodingmethod. Slice type designation information (slice_type) designating atype of slice is an example of a coding parameter included in the sliceheader SH.

As the types of slices which can be designated by the slice typedesignation information, (1) an I slice in which only intra-predictionis used at the time of coding, (2) a P slice in which uni-directionalprediction or intra-prediction are used at the time of coding, and (3) aB slice in which uni-directional prediction, bi-directional prediction,or intra-prediction is used at the time of coding can be exemplified.

The slice header SH may include a reference (pic_parameter_set_id) tothe picture parameter set PPS which is included in the sequence layer.

(Slice Data Layer)

In the slice data layer, a set of data which is referred to by the imagedecoding device 31 to decode the processing target slice data SDATA isdefined. As illustrated in FIG. 3(d), the slice data SDATA includes acoded tree block (CTB). The CTB is a block with a fixed size (forexample, 64×64) forming a slice and is also referred to as a largestcording unit (LCU) in some cases.

(Coding Tree Layer)

In the coding tree layer, as illustrated in FIG. 3(e), a set of datawhich is referred to by the image decoding device 31 to decode aprocessing target coded tree block is defined. The coded tree unit ispartitioned through recursive quadtree partition. A node of a treestructure obtained through the recursive quadtree partition is referredto as a coding tree. An immediate node of a quadtree is defined as acoded tree unit (CTU) and the coded tree block is also defined as ahighest CTU. The CTU includes a splitting flag (split_flag). In a casewhere split_flag is 1, the coded tree unit is partitioned to four codedtree units CTU. In a case where split_flag is 0, the coded tree unit CTUis partitioned into four coded units (CU). The coded unit CU is an endnode of the coding tree and no further partition is executed in thislayer. The coded unit CU is a base unit of a coding process.

In a case where the coded tree block CTB has a size of 64×64 pixels, thesize of the coded unit CU can be one of 64×64 pixels, 32×32 pixels,16×16 pixels, and 8×8 pixels.

(Coding Unit Layer)

In the coding unit layer, as illustrated in FIG. 3(f), a set of datareferred to by the image decoding device 31 to decode the coding unit ofa processing target is defined. Specifically, the coding unit isconfigured to include a CU header CUH, a prediction tree, a transformtree, a CU header CUF. In the CU header CUH, for example, whether thecoding unit is a unit used for intra-prediction or a unit used forinter-prediction is defined. In the CU header CUH, the coding unitincludes a residual prediction weight index iv_res_pred_weight_idxindicating a weight (or whether to execute residual prediction) used forresidual prediction or an illumination compensation flag ic_flagindicating whether to use illumination compensation prediction. Thecoding unit is a root of a prediction unit (PU) and a transform tree(TT). The CU header CUF is included between the prediction tree and thetransform tree or after the transform tree.

In the prediction tree, the coding unit is partitioned into oneprediction block or a plurality of prediction blocks and the positionand size of each prediction block are defined. In other words, theprediction block is a region included in the coding unit and one orplurality of regions which do not overlap with each other. Theprediction tree includes one prediction block or a plurality ofprediction blocks obtained through the above-described partition.

The prediction process is executed for each prediction block.Hereinafter, the prediction block which is a unit of prediction isreferred to as a prediction unit (PU). More specifically, since theprediction is executed in units of color components, a block of eachcolor component such as a luminance prediction block or a chromaprediction block is referred to as a prediction block below and referredto as a prediction unit to be fitted to a block of a plurality of colorcomponents (a luminance prediction block or a chroma prediction block).A block in which an index cIdx (colour_component Idx) indicating a kindof a color component) is 0 indicates a cIdx (colour_component Idx)indicates a luminance block (luminance prediction block) (usuallyindicated as L or Y) and a block in which cIdx is 1 or 2 indicates a Cbor Cr chroma block (chroma prediction block).

Roughly speaking, there are two types of partition in the predictiontree in the case of intra-prediction and the case of inter-prediction.The intra-prediction refers to prediction in the same picture and theinter-prediction refers to a prediction process executed betweenmutually different pictures (for example, between display times orbetween layer images).

In the case of intra-prediction, there are 2N×2N (which is the same sizeof the coding unit) and N×N partition methods.

In the case of inter-prediction, coding is executed in a partition modepart_mode of the coded data in a partition method. In the partition modedesignated in the partition mode part_mode, there are a total of thefollowing 8 types of patterns when the size of the target CU is set to2N×2N. That is, there are four symmetric partitions (symmetricsplittings), 2N×2N pixels, 2N×N pixels, N×2N pixels, and N×N pixels, andfour asymmetric motion partitions (AMP), 2N×nU pixels, 2N×nD pixels,nL×2N pixels, and nR×2N pixels. N=2 m (where m is any integer equal toor greater than 1) is meant. Hereinafter, a prediction block of whichthe partition mode is the asymmetric motion partition is also referredto as an AMP block. Since the number of partitions is one of 1, 2, and4, the number of PUs included in the CU is 1 to 4. The PUs are expressedas PU0, PU1, PU2, and PU3 in order.

FIGS. 4(a) to 4(h) specifically illustrate the positions of boundariesof PU partition in the CU in the partition modes.

FIG. 4(a) illustrates the partition mode of 2N×2N in which partition ofthe CU is not executed. FIGS. 4(b) and 4(e) illustrate the shapes ofpartition in a case where the partition modes 2N×N and N×2N,respectively. FIG. 4(h) illustrates the shape of partition in a casewhere the partition mode is N×N.

FIGS. 4(c), 4(d), 4(f), and 4(g) illustrate the shapes of partition incases of 2N×nU, 2N×nD, nL×2N, and nR×2N which are the asymmetric motionpartitions (AMP), respectively.

FIGS. 4(a) to 4(h), numbers given in regions indicate identificationnumbers of the regions and a process is executed in the regions in theorder of the identification numbers. That is, the identification numbersindicate a scanning order of the regions.

In the prediction block in the case of the inter-prediction, 7 types ofpartition modes except for N×N (see FIG. 4(h)) are defined among the 8types of partition modes.

A specific value of N is defined in accordance with the size of the CUto which the PU belongs, and specific values of nU, nD, nL, and nR aredecided according to the value of N. For example, a CU of 32×32 pixelscan be partitioned into prediction blocks of the inter-prediction of32×32 pixels, 32×16 pixels, 16×32 pixels, 32×16 pixels, 32×8 pixels,32×24 pixels, 8×32 pixels, and 24×32 pixels.

In the transform tree, the coding unit is partitioned into one transformblock or a plurality of transform blocks and the position and size ofeach transform block are defined. In other words, the transform block isa region included in the coding unit and one or plurality of regionswhich do not overlap with each other. The transform tree includes onetransform block or a plurality of transform blocks obtained through theabove-described partition.

As the partition of the transform tree, there is partition in which aregion with the same size as the coding unit is allocated as thetransform block and partition by recursive quadtree partition, as in thepartition of the above-described tree block.

A transform process is executed for each transform block. Hereinafter,the transform block which is a unit of transform is referred to as atransform unit (TU).

(Prediction Parameter)

A predicted image of the prediction unit is derived by a predictionparameter subordinate to the prediction unit. As the predictionparameter, there is a prediction parameter of intra-prediction or aprediction parameter of inter-prediction. Hereinafter, the predictionparameter of inter-prediction (inter-prediction parameter) will bedescribed. The inter-prediction parameter is configured to includeprediction use flags predFlagL0 and predFlagL1, reference pictureindexes refIdxL0 and refIdxL1, and vectors mvL0 and mvL1. The predictionuse flags predFlagL0 and predFlagL1 are flags indicating whether to usereference picture lists respectively called an L0 list and an L1 list,and the reference picture list corresponding to the case of a value of 1is used. In a case where “a flag indicating whether XX is indicated” isdescribed in the present specification, 1 is set to a case where XX isindicated and 0 is set to a case where XX is not indicated. Then, 1 istreated to be true and 0 is treated to be false in logical NOT, logicalAND, or the like (the same applies below). However, in actual devices ormethods, other values can also be used as a true value and a falsevalue. A case where two reference picture lists are used, that is, acase of (predFlagL0, predFlagL1)=(1, 1), corresponds to bi-prediction. Acase where one reference picture list is used, that is, a case of(predFlagL0, predFlagL1)=(1, 0), or (predFlagL0, predFlagL1)=(0, 1),corresponds to uni-prediction. Information regarding the prediction useflag can also be expressed as an inter-prediction identifierinter_pred_idc to be described below. Normally, the prediction use flagis used in a predicted image generation section and a predictionparameter memory to be described below. In a case where informationindicating which reference picture list is used or not is decoded fromthe coded data, the inter-prediction identifier inter_pred_idc is used.

Examples of syntax elements used to derive the inter-predictionparameter included in the coded data include a partition mode part_mode,a merge flag merge_flag, a merge index merge_idx, an inter-predictionidentifier inter_pred_idc, a reference picture index refIdxLX, aprediction vector flag mvp_LX_flag, and a difference vector mvdLX. LX isa description method used in a case where L0 prediction and L1prediction are not distinguished from each other. By substituting LXwith L0 and L1, parameters for the L0 list and parameters for the L1list are distinguished from each other (the same applies below). Forexample, refIdxL0 is a reference picture index used for L0 predictionand refIdxL1 is a reference picture index used for L1 prediction. Here,refIdx (refIdxLX) is notation used in a case where refIdxL0 and refIdxL1are not distinguished from each other.

(Example of Reference Picture List)

Next, an example of the reference picture list will be described. Thereference picture list is a line formed by reference pictures stored ina reference picture memory 306. FIG. 5 is a conceptual diagramillustrating an example of the reference picture list RefPicListX. Inthe reference picture list RefPicListX, 5 rectangles arrangedhorizontally in a line indicate reference pictures. Codes P1, P2, Q0,P3, and P4 shown in order from the left end to the right are codesindicating reference pictures. P such as P1 indicates a viewpoint P andQ such as Q0 indicates a different viewpoint Q from the viewpoint P. Thesuffixes of P and Q indicate picture order numbers POC. A downward arrowimmediately below refIdxLX indicates that the reference picture indexrefIdxLX is an index referring to the reference picture Q0 in thereference picture memory 306.

(Example of Reference Picture)

Next, an example of the reference picture used at the time of derivationof a vector will be described. FIG. 6 is a conceptual diagramillustrating an example of the reference picture. In FIG. 6, thehorizontal axis represents a display time and the vertical axisrepresents a viewpoint. As illustrated in FIG. 6, rectangles of 2vertical rows and 3 horizontal columns (a total of 6 rectangles)indicate pictures. Of the 6 rectangles, the second rectangle from theleft in the low row indicates a picture of a decoding target (targetpicture). The remaining five rectangles indicate reference pictures. Areference picture Q0 indicated by an upward arrow from the targetpicture is a picture of which a display time is the same as the targetpicture and a viewpoint (view ID) is different from the target picture.In disparity prediction in which a target picture serves as a standard,the reference picture Q0 is used. A reference picture P1 indicated by aleftward arrow from the target picture is a past picture of which theviewpoint is the same as the target picture. A reference picture P2indicated by a rightward arrow from the target picture is a futurepicture of which the viewpoint is the same as the target picture. Inmotion prediction in which a target picture serves as a criterion, thereference picture P1 or P2 is used.

(Inter-Prediction Identifier and Prediction Use Flag)

A relation between the inter-prediction identifier inter_pred_idc andthe prediction use flags predFlagL0 and predFlagL1 can be mutuallyconverted using formulae:

inter_pred_idc=(predFlagL1<<1)+predFlagL0;

predFlagL0=inter_pred_idc & 1; and

predFlagL1=inter_pred_idc>>1.

Here, >> is a right shift and << is a left shift.Therefore, as the inter-prediction parameter, the prediction use flagspredFlagL0 and predFlagL1 may be used or the inter-prediction identifierinter_pred_idc may be used. Hereinafter, in determination in which theprediction use flags predFlagL0 and predFlagL1 are used, the flags canalso be substituted with the inter-prediction identifier inter_pred_idc.In contrast, in determination in which the inter-prediction identifierinter_pred_idc is used, the flag can also be substituted with theprediction use flags predFlagL0 and predFlagL1.

(Merge Mode and AMVP Prediction)

In a method of decoding (coding) the prediction parameter, there are amerge mode and an adaptive motion vector prediction (AMVP) mode. Themerge flag merge_flag is a flag used to identify these modes. In eitherthe merge mode or the AMVP mode, a prediction parameter of a target PUis derived using the prediction parameter of the block which has alreadybeen processed. The merge mode is a mode in which the prediction useflag predFlagLX (the inter-prediction identifier inter_pred_idc), thereference picture index refIdxLX, and the vector mvLX are not includedin coded data and is a mode in which the already derived predictionparameters are used without change. The AMVP mode is a mode in which theinter-prediction identifier inter_pred_idc, the reference picture indexrefIdxLX, and the vector mvLX are included in coded data. The vectormvLX is coded as a difference vector (mvdLX) and a prediction vectorflag mvp_LX_flag indicating a prediction vector.

The inter-prediction identifier inter_pred_idc is data indicating thetypes and numbers of reference pictures and has a value of one ofPred_L0, Pred_L1, and Pred_BI. Pred_L0 and Pred_L1 each indicate thatreference pictures stored in the reference picture lists referred to asthe L0 list and the L1 list are used and both indicate that onereference picture is used (uni-prediction). The prediction using the L0list and the L1 list are referred to as L0 prediction and L1 prediction,respectively. Pred_BI indicates that 2 reference pictures are used(bi-prediction) and indicates that 2 reference pictures stored in the L0list and the L1 list are used. The prediction vector index mvp_LX_flagis an index indicating a prediction vector and the reference pictureindex refIdxLX is an index indicating the reference picture stored inthe reference picture list. The merge index merge_idx is an indexindicating that one prediction parameter among prediction parametercandidates (merge candidates) derived from the completely processedblock is used as a prediction parameter of the prediction unit (targetblock).

(Motion Vector and Disparity Vector)

As the vector mvLX, there are a motion vector and a disparity vector(parallax vector). The motion vector is a vector that indicates aposition deviation between the position of a block in a picture of acertain layer at a certain display time and the position of acorresponding block in the picture of the same layer at a differentdisplay time (for example, an adjacent discrete time). The disparityvector is a vector that indicates a position deviation between theposition of a block in a picture of a certain layer at a certain displaytime and the position of a corresponding block in a picture of adifferent layer at the same display time. The picture of the differentlayer is a picture with a different viewpoint in some cases or is apicture with a different resolution in some cases. In particular, thedisparity vector corresponding to the picture with the differentviewpoint is referred to as a parallax vector. In the followingdescription, in a case where the motion vector and the disparity vectorare not distinguished from each other, the motion vector and thedisparity vector are simply referred to as vectors mvLX. A predictionvector and a difference vector in regard to the vector mvLX are referredto as a prediction vector mvpLX and a difference vector mvdLX,respectively. Whether the vector mvLX and the difference vector mvdLXare the motion vectors or the disparity vectors is executed using thereference picture index refIdxLX subordinate to the vector.

(Configuration of Image Decoding Device)

Next, the configuration of the image decoding device 31 according to theembodiment will be described. FIG. 7 is a schematic diagram illustratingthe configuration of the image decoding device 31 according to theembodiment. The image decoding device 31 is configured to include anentropy decoding section 301, a prediction parameter decoding section302, a reference picture memory (reference image storage section or aframe memory) 306, a prediction parameter memory (prediction parameterstorage section or a frame memory) 307, a predicted image generationsection 308, an inverse quantization and inverse DCT section 311, anaddition section 312, and a depth DV derivation section 351 (notillustrated).

The prediction parameter decoding section 302 is configured to includean inter-prediction parameter decoding section 303 and anintra-prediction parameter decoding section 304. The predicted imagegeneration section 308 is configured to include an inter-predicted imagegeneration section 309 and an intra-predicted image generation section310.

The entropy decoding section 301 executes entropy decoding on the codedstream Te input from the outside, and separates and decodes individualcodes (syntax elements). As the separated code, there are, for example,prediction information used to generate a predicted image and residualinformation used to generate a difference image.

The entropy decoding section 301 outputs some of the separated codes tothe prediction parameter decoding section 302. Some of the separatedcodes are, for example, a prediction mode PredMode, the partition modepart_mode, the merge flag merge_flag, the merge index merge_idx, theinter-prediction identifier inter_pred_idc, the reference picture indexrefIdxLX, the prediction vector flag mvp_LX_flag, the difference vectormvdLX, the residual prediction index iv_res_pred_weight_idx, and theillumination compensation flag is flag. Which codes are decoded iscontrolled based on an instruction of the prediction parameter decodingsection 302. The entropy decoding section 301 outputs a quantizationcoefficient to the inverse quantization and inverse DCT section 311. Thequantization coefficient is a coefficient which is quantized andobtained by executing discrete cosine transform (DCT) on a residualsignal in a coding process. The entropy decoding section 301 outputs adepth DV conversion table DepthToDisparityB to the depth DV derivationsection 351. The depth DV conversion table DepthToDisparityB is a tablefor converting the pixel value of a depth image into a parallaxindicating disparity between viewpoint images, and the componentDepthToDisparityB[d] of the depth DV conversion table DepthToDisparityBcan be obtained using a slope cp_scale, an offset cp_off, and slopeprecision cp_precision by the following formula:

log 2 Div=BitDepthY−1+cp_precision;

offset=(cp_off<<BitDepthY)+((1<<log 2 Div)>>1);

scale=cp_scale; and

DepthToDisparityB[d]=(scale*d+offset)>>log 2 Div.

The parameters cp_scale, cp_off, and cp_precision are decoded from aparameter set in the coded data at each preferred viewpoint. BitDepthYindicates a bit depth of a pixel value corresponding to a luminancesignal and has, for example, 8 as a value.

The prediction parameter decoding section 302 receives some of the codesas inputs from the entropy decoding section 301. The predictionparameter decoding section 302 decodes the prediction parameterscorresponding to the prediction mode indicated by the prediction modePredMode which is a part of the codes. The prediction parameter decodingsection 302 outputs the prediction mode PredMode and the decodedprediction parameters to the prediction parameter memory 307 and thepredicted image generation section 308.

The inter-prediction parameter decoding section 303 decodes aninter-prediction parameter with reference to the prediction parametersstored in the prediction parameter memory 307 based on the codes inputfrom the entropy decoding section 301. The inter-prediction parameterdecoding section 303 outputs the decoded inter-prediction parameters tothe predicted image generation section 308 and stores the decodedinter-prediction parameters in the prediction parameter memory 307. Thedetails of the inter-prediction parameter decoding section 303 will bedescribed below.

The intra-prediction parameter decoding section 304 decodes theintra-prediction parameter with reference to the prediction parameterstored in the prediction parameter memory 307 based on the codes inputfrom the entropy decoding section 301. The intra-prediction parameterrefers to a parameter used for a process of predicting a picture blockin one picture and is, for example, an intra-prediction modeintraPredMode. The intra-prediction parameter decoding section 304outputs the decoded intra-prediction parameter to the predicted imagegeneration section 308 and stores the decoded intra-prediction parameterin the prediction parameter memory 307.

The reference picture memory 306 stores a decoded picture blockrecSamples generated by the addition section 312 at the position of thedecoded picture block.

The prediction parameter memory 307 stores the prediction parameter at aposition decided in advance for each decoding target picture and block.Specifically, the prediction parameter memory 307 stores theinter-prediction parameter decoded by the inter-prediction parameterdecoding section 303, the intra-prediction parameter decoded by theintra-prediction parameter decoding section 304, and the prediction modePredMode separated by the entropy decoding section 301. As the storedinter-prediction parameter, for example, there are the prediction useflag predFlagLX, the reference picture index refIdxLX, and the vectormvLX.

The prediction mode PredMode and the prediction parameter are input fromthe prediction parameter decoding section 302 to the predicted imagegeneration section 308. The predicted image generation section 308 readsthe reference picture from the reference picture memory 306. Thepredicted image generation section 308 generates a predicted pictureblock predSamples (predicted image) using the input predictionparameters and the read reference picture in the prediction modeindicated by the prediction mode PredMode.

Here, in a case where the prediction mode PredMode indicates aninter-prediction mode, the inter-predicted image generation section 309generates the predicted picture block predSamples through theinter-prediction using the inter-prediction parameter input from theinter-prediction parameter decoding section 303 and the read referencepicture. The predicted picture block predSamples corresponds to theprediction unit PU. The PU corresponds to a part of a picture which isformed by a plurality of pixels and is a unit in which the predictionprocess is executed, as described above, that is, a decoding targetblock subjected to a prediction process once.

The inter-predicted image generation section 309 reads, from thereference picture memory 306, the reference picture block located at theposition indicated by the vector mvLX using the prediction unit as astandard from the reference picture RefPicListLX[refIdxLX]indicated bythe reference picture index refIdxLX in regard to the reference picturelist RefPicListLX in which the prediction use flag predFlagLX is 1. Theinter-predicted image generation section 309 executes motioncompensation on the read reference picture block to generate a predictedpicture block predSamplesLX. The inter-predicted image generationsection 309 generates the predicted picture block predSamples frompredicted picture blocks predSamplesL0 and predSamplesL1 derived furtherfrom the reference picture of each reference picture list and outputsthe predicted picture block predSamples to the addition section 312.

In a case where the prediction mode predMode indicates theintra-prediction mode, the intra-predicted image generation section 310executes the intra-prediction using the intra-prediction parameter inputfrom the intra-prediction parameter decoding section 304 and the readreference picture. Specifically, the intra-predicted image generationsection 310 reads, from the reference picture memory 306, the referencepicture block which is the decoding target picture and is within apre-decided range from the prediction unit among the already processedblocks. The pre-decided range is, for example, a range of the left, topleft, top, and top right of adjacent blocks and is different accordingto the intra-prediction mode.

The intra-predicted image generation section 310 executes the predictionon the read reference picture block in the prediction mode indicated bythe intra-prediction mode IntraPredMode to generate the predictedpicture block predSamples, and then outputs the generated predictedpicture block predSamples to the addition section 312.

The inverse quantization and inverse DCT section 311 executes inversequantization on the quantization coefficient input from the entropydecoding section 301 to obtain a DCT coefficient. The inversequantization and inverse DCT section 311 executes inverse discretecosine transform (DCT) on the obtained DCT coefficient to calculate adecoded residual signal. The inverse quantization and inverse DCTsection 311 outputs the calculated decoded residual signal to theaddition section 312.

The addition section 312 adds the predicted picture blocks predSamplesinput from the inter-predicted image generation section 309 and theintra-predicted image generation section 310 and the signal valueresSamples of the decoded residual signal input from the inversequantization and inverse DCT section 311 for each pixel to generatedecoded picture blocks recSamples. The addition section 312 outputs thegenerated decoded picture blocks recSamples to the reference picturememory 306. The decoded picture blocks are integrated for each picture.Loop filters such as a deblock filter and an adaptive offset filter areapplied to the decoded picture. The decoded picture is output as thedecoded layer image Td to the outside.

(Configuration of Inter-Prediction Parameter Decoding Section)

Next, the configuration of the inter-prediction parameter decodingsection 303 will be described. FIG. 8 is a schematic diagramillustrating the configuration of the inter-prediction parameterdecoding section 303 according to the embodiment. The inter-predictionparameter decoding section 303 is configured to include aninter-prediction parameter decoding control section 3031, an AMVPprediction parameter derivation section 3032, an addition section 3035,a merge mode parameter derivation section 3036, and a disparityderivation section 30363.

The inter-prediction parameter decoding control section 3031 instructsthe entropy decoding section 301 to decode the codes (syntax elementsrelated to the inter-prediction and extracts codes (syntax elements))included in the coded data, for example, the partition mode part_mode,the merge flag merge_flag, the merge index merge_idx, theinter-prediction identifier inter_pred_idc, the reference picture indexrefIdxLX, the prediction vector flag mvp_LX_flag, the difference vectormvdLX, the residual prediction index iv_res_pred_weight_idx, theillumination compensation flag ic_flag, and a DBBP flag dbbp_flag. In acase where the inter-prediction parameter decoding control section 3031expresses the extraction of certain syntax elements, it is meant thatthe inter-prediction parameter decoding control section 3031 instructsthe entropy decoding section 301 to decode the certain syntax elementsand reads the corresponding syntax elements from the coded data.

In a case where the merge flag merge_flag is 1, that is, the predictionunit is in the merge mode, the inter-prediction parameter decodingcontrol section 3031 extracts, for example, the merge index merge_idxfrom the coded data. The inter-prediction parameter decoding controlsection 3031 outputs the extracted residual prediction indexiv_res_pred_weight_idx, the illumination compensation flag ic_flag, andthe merge index merge_idx to the merge mode parameter derivation section3036.

In a case where the merge flag merge_flag is 0, that is, the predictionblock is in the AMVP prediction mode, the inter-prediction parameterdecoding control section 3031 extracts the inter-prediction identifierinter_pred_idc, the reference picture index refIdxLX, the predictionvector flag mvp_LX_flag, and the difference vector mvdLX from the codeddata using the entropy decoding section 301. The inter-predictionparameter decoding control section 3031 outputs the prediction use flagpredFlagLX and the reference picture index refIdxLX derived from theextracted inter-prediction identifier inter_pred_idc to the AMVPprediction parameter derivation section 3032 and the predicted imagegeneration section 308 and stores the prediction use flag predFlagLX andthe reference picture index refIdxLX in the prediction parameter memory307. The inter-prediction parameter decoding control section 3031outputs the extracted prediction vector flag mvp_LX_flag to the AMVPprediction parameter derivation section 3032 and outputs the extracteddifference vector mvdLX to the addition section 3035.

In a case where the partition mode PartMode is a specific value, theinter-prediction parameter decoding control section 3031 decodes theDBBP flag dbbp_flag from the coded data. In other cases, that is, in acase where dbbp_flag is not included in the coded data, 0 is estimatedas dbbp_flag. FIG. 20 is a syntax table illustrating the DBBP flagdbbp_flag according to the embodiment. The inter-prediction parameterdecoding control section 3031 decodes cu_skip_flag, pred_mode,part_mode, and dbbp_flag indicated in SE 1001 to SE 1004 of the drawing.Here, cu_skip_flag is a flag indicating whether a target CU is skipped.In a case where target CU is skipped, PartMode is limited to 2N×2N anddecoding of the partition mode part_mode is omitted. The partition modepart_mode decoded from the coded data is set in the partition modePredMode. In a case where the partition mode PartMode (=part_mode) is2N×N in this example, the inter-prediction parameter decoding controlsection 3031 decodes dbbp_flag. In a case where the partition mode isother values, the inter-prediction parameter decoding control section3031 may decode dbbp_flag. The DBBP dbbp_flag may be derived accordingto a different method from the foregoing method.

The inter-prediction parameter decoding control section 3031 outputs adisparity vector (NBDV) derived at the time of derivation of theinter-prediction parameter and a VSP mode flag VspModeFlag which is aflag indicating whether to execute viewpoint synthesis prediction to theinter-predicted image generation section 309.

FIG. 9 is a schematic diagram illustrating the configuration of themerge mode parameter derivation section 3036 according to theembodiment. The merge mode parameter derivation section 3036 includes amerge candidate derivation section 30361, a merge candidate selectionsection 30362, and a bi-prediction restriction section 30363. The mergecandidate derivation section 30361 is configured to include a mergecandidate storage section 303611, an enhancement merge candidatederivation section 30370, and a base merge candidate derivation section30380.

The merge candidate storage section 303611 stores merge candidates inputfrom the enhancement merge candidate derivation section 30370 and thebase merge candidate derivation section 30380 in the merge candidatelist mergeCandList. The merge candidates are configured to include theprediction use flag predFlagLX, the vector mvLX, the reference pictureindex refIdxLX, the VSP mode flag VspModeFlag, a disparity vectorMvDisp, and a layer IDRefViewIdx. In the merge candidate storage section303611, indexes can be allocated to the merge candidates stored in amerge candidate list mergeCandList according to a predetermined rule.

FIG. 11 is a diagram illustrating an example of the merge candidate listmergeCandList derived by the merge candidate derivation section 30361.FIG. 11(a) illustrates the merge candidates derived by the mergecandidate storage section 303611 in the base layer (a layerIDnal_unit_layer=0). In a case where two merge candidates are the sameprediction parameter, a merge index order is an order of a spatial mergecandidate (A1), a spatial merge candidate (B1), a spatial mergecandidate (B0), a spatial merge candidate (A0), and a spatial mergecandidate (B2), excluding a process (pruning process) of filling asequence. Nicknames of the merge candidates are notated in parenthesesand the parentheses correspond to the positions of the reference blocksused for the derivation in the case of the spatial merge candidates.After the merge candidates, coupled merge candidates and zero mergecandidates are present, but are omitted in FIG. 11. Such mergecandidates, that is, the spatial merge candidates, the temporal mergecandidates, the coupled merge candidates, and the zero merge candidatesare derived by the base merge candidate derivation section 30380. FIG.11(b) illustrates merge candidates derived by the merge candidatestorage section 303611 in an enhancement layer (layer IDnal_unit_layer!=0) which is a layer other than the base layer. A merge index order isan order of a texture merge candidate (T), an interview merge candidate(IvMC), a spatial merge candidate (A1), a spatial merge candidate (B1),a spatial merge candidate (B0), a disparity merge candidate (IvDC), aVSP merge candidate (VSP), the spatial merge candidate (A0), a spatialmerge candidate (B2), a motion shift merge candidate (IvMCShift), adisparity shift merge candidate (IvDCShift), and the time mergecandidate (Col). Nicknames of the merge candidates are notated inparentheses. After the merge candidates, coupled merge candidates andzero merge candidates are present, but are omitted in FIG. 11. Thetexture merge candidate (T), the interview merge candidate (IvMC), thedisparity merge candidate (IvDC), the VSP merge candidate (VSP), themotion shift merge candidate (IvMCShift), and the disparity shift mergecandidate (IvDCShift) are derived by the enhancement merge candidatederivation section 30370.

FIG. 12 is a diagram illustrating the positions of adjacent blocks towhich spatial merge candidates refer. A0, A1, B0, B1, and B2 correspondto positions illustrated in FIG. 12, respectively, and the coordinatesthereof are as follows. In a case where the top left coordinates of theprediction unit are xPb and yPb and the width and height of theprediction unit are nPbW and nPbH, the positions of the adjacent blocksare as follows.

A0: (xPb−1, yPb+nPbH);

A1: (xPb−1, yPb+nPbH−1);

B0: (xPb+nPbW, yPb−1);

B1: (xPb+nPbW−1, yPb−1); and

B2: (xPb−1, yPb−1).

The enhancement merge candidate derivation section 30370 is configuredto include an inter-layer merge candidate derivation section 30371(interview merge candidate derivation section 30371), a disparity mergecandidate derivation section 30373, and a VSP merge candidate derivationsection 30374 (VSP prediction section 30374). The enhancement mergecandidates are different merge candidates from base merge candidates tobe described below and include at least one of the texture mergecandidate (T), the interview merge candidate (IvMC), the disparity mergecandidate (IvDC), the VSP merge candidate (VSP), the motion shift mergecandidate (IvMCShift), and the disparity shift merge candidate(IvDCShift).

(Texture Merge Candidate)

The inter-layer merge candidate derivation section 30371 derives thetexture merge candidate (T), the interview merge candidate (IvMC), andthe motion shift merge candidate (IvMCShift). These merge candidates arederived by selecting a block corresponding to the prediction unit fromthe reference picture of another layer (for example, the base layer or abase view) having the same POC as the target picture and reading theprediction parameter which is a motion vector included in the block fromthe prediction parameter memory 307.

The texture merge candidate (T) is derived in the inter-layer mergecandidate derivation section 30371 in a case where the target picture isa depth. The texture merge candidate (T) is derived by specifying thereference block from a depth picture having the same view ID as thetarget picture and reading a motion vector of the reference block. Thecoordinates (xRef, yRef) of the reference block is derived from thefollowing formulae in a case where the top left coordinates of theprediction unit are xPb and yPb and the width and height of theprediction unit are nPbW and nPbH.

xRefFull=xPb+((nPbW−1)>>1);

yRefFull=yPb+((nPbH−1)>>1);

xRef=Clip3(0,PicWidthInSamplesL−1,(xRefFull>>3)<<3); and

yRef=Clip3(0,PicHeightInSamplesL−1,(yRefFull>>3)<<3).

PicWidthInSamplesL and PicHeightInSamplesL indicate the width and heightof an image, respectively, and the function Clip3 (x, y, z) is afunction that restricts (clips) z to x or more and y or less and returnsa restricted result.

When a motion vector of the reference block is textMvLX, a motion vectormvLXT of the texture merge candidate is derived by the followingformulae.

mvLXT[0]=(textMvLX[xRef][yRef][0]+2)>>2; and

mvLXT[1]=(textMvLX[xRef][yRef][1]+2)>>2.

For the texture merge candidates, the prediction parameters may beallocated in sub-block units obtained by further partitioning theprediction unit.

(Interview Merge Candidate)

The interview merge candidate has the same POC as the target picturespecified by the disparity vector derivation section 352 to be describedbelow and is derived in the inter-layer merge candidate derivationsection 30371 by reading the prediction parameter such as a motionvector from the reference block of the reference picture ivRefPic havinga different view ID (refViewIdx). This process is referred to as atemporal interview motion candidate derivation process. As the temporalinterview motion candidate derivation process, the inter-layer mergecandidate derivation section 30371 first derives reference coordinates(xRef, yRef) from the following formulae in a case where the top leftcoordinates of a block are (xPb, yPb), the width and height of the blockare nPbW and nPbH, and a disparity vector derived from the disparityvector derivation section 352 is (mvDisp[0], mvDisp[1]).

xRefFull=xPb+(nPbW>>1)+((mvDisp[0]+2)>>2);

yRefFull=yPb+(nPbH>>1)+((mvDisp[1]+2)>>2);

xRef=Clip3(0,PicWidthInSamplesL−1,(xRefFull>>3)<<3); and

yRef=Clip3(0,PicHeightInSamplesL−1,(yRefFull>>3)<<3).

Next, in the inter-layer merge candidate derivation section 30371, atemporal interview motion candidate derivation process is executed in atemporal interview motion candidate derivation section 303711 (notillustrated).

The temporal interview motion candidate derivation section 303711derives a reference block position (xRef, yRef) from the coordinates(xPb, yPb) of the block, the width nPbW and nPbH of the block, and thedisparity vector mvDisp of the block through the foregoing process andfurther derives a vector of a temporal interview motion candidate withreference to the vector of a prediction unit on the reference pictureivRefPic located at the reference block position (xRef, yRef). First,the top left coordinates of a prediction unit (luminance predictionblock) on the reference picture ivRefPic including the coordinatesindicated at the reference block position (xRef, yRef) are assumed to be(xIvRefPb, yIvRefPb). A reference picture list, a prediction list flag,a vector, and a reference picture index included in the prediction uniton the reference picture ivRefPic are assumed to be refPicListLYIvRef,predFlagLYIvRef[x][y], mvLYIvRef[x][y], and refIdxLYIvRef[x][y],respectively.

In a case where the prediction use flagpredFlagLYIvRef[xIvRefPb][yIvRefPb] is 1, the temporal interview motioncandidate derivation section 303711 determines whether PicOrderCnt(refPicListLYIvRef[refIdxLYIvRef[xIvRefPb][yIvRefPb]]) which is POC ofthe prediction unit on the reference picture ivRefPic is the same asPicOrderCnt (RefPicListLX[i]) which is POC of the reference picture of atarget prediction unit in an index i of the number of reference picturelist components−1 (num_ref_idx_IX_active_minus 1) from 0. In a casewhere PicOrderCnt (refPicListLYIvRef[refIdxLYIvRef[xIvRefPb][yIvRefPb]])is the same as PicOrderCnt (RefPicListLX[i]), a predictable flagavailableFlagLXInterView (that is, a case wheremvLYIvRef[xIvRefPb][yIvRefPb] is a disparity vector), a vectormvLXInterView, and a reference picture index refIdxLX are derived by thefollowing formulae.

availableFlagLXInterView=1;

mvLXInterView=mvLYIvRef[xIvRefPb][yIvRefPb]; and

refIdxLX=i.

That is, in a case where the reference picture referred to by the targetprediction unit is the same as the reference picture referred to by theprediction unit on the reference picture ivRefPic, the temporalinterview motion candidate derivation section 303711 derives the vectormvLXInterveiw and the reference picture index refIdxLX using theprediction parameters of the prediction unit on the reference pictureivRefPic.

For the interview merge candidates, the prediction parameters may beallocated in sub-block units obtained by further partitioning theprediction unit. For example, in a case where the width and height ofthe prediction unit are nPbW and nPbH and the minimum size of asub-block is SubPbSize, a width nSbW and a height nSbH of the sub-blockare derived by the following formulae.

nSbW=nPbW/SubPbSize<=1?nPbW: SubPbSizen; and

nSbH=nPbH/SubPbSize<=1?nPbH: SubPbSize.

Subsequently, the above-described temporal interview motion candidatederivation section 303711 derives a vector spMvLX[xBlk][yBlk], areference picture index spRefIdxLX[xBlk][yBlk], and a prediction useflag spPredFlagLX[xBlk][yBlk] for each sub-block.

Here, (xBlk, yBlk) are relative coordinates (coordinates when the topleft coordinates of the prediction unit are a standard) of the sub-blockin the prediction unit and has integer values of (nPbW/nSbW−1) from 0and (nPbH/nSbH−1) from 0, respectively. When the coordinates of theprediction unit are (xPb, yPb) and the relative coordinates of thesub-block in the prediction unit are (xBlk, yBlk), the coordinates ofthe sub-block in the picture are expressed as (xPb+xBlk*nSbW,yPb+yBlk*nSbH).

The temporal interview motion candidate derivation process is executedin the sub-block units using the coordinates (xPb+xBlk*nSbW,yPb+yBlk*nSbH) of the sub-block in the picture and the width nSbW andthe height nSbH of the sub-block as inputs (xPb, yPb), nPbW, and nPbH ofthe temporal interview motion candidate derivation section 303711.

The temporal interview motion candidate derivation section 303711derives the vector spMvLX, the reference picture index spRefIdxLX, andthe prediction use flag spPredFlagLX corresponding to the sub-block bythe following formulae from the vector mvLXInterView, the referencepicture index refIdxLXInterView, and the prediction use flagavailableFlagLXInterView of the interview merge candidate in thesub-block in which the predictable flag availableFlagLXInterView is 0.

spMvLX[xBlk][yBlk]=mvLXInterView;

spRefIdxLX[xBlk][yBlk]=refIdxLXInterView; and

spPredFlagLX[xBlk][yBlk]=availableFlagLXInterView.

Here, xBlk and yBlk are a sub-block address and has values of(nPbW/nSbW−1) from 0 and (nPbH/nSbH−1) from 0, respectively. The vectormvLXInterView, the reference picture index refIdxLXInterView, and theprediction use flag availableFlagLXInterView of the interview mergecandidate are derived by executing the temporal interview motioncandidate derivation process using (xPb+(nPbW/nSbW/2)*nSbW,yPb+(nPbH/nSbH/2)*nSbH) as reference block coordinates.

(Motion Shift Merge Candidate)

The motion shift merge candidate has the same POC as the target picturespecified by the disparity vector derivation section 352 and is derivedin the inter-layer merge candidate derivation section 30371 by readingthe prediction parameter such as a motion vector from the referenceblock of the picture having a different view ID. The coordinates (xRef,yRef) of the reference block are derived from the following formulae ina case where the top left coordinates are (xPb, yPb) of the predictionunit, the width and height of the prediction unit are nPbW and nPbH, andthe disparity vector derived from the disparity vector derivationsection 352 is (mvDisp[0], mvDisp[1]).

xRefFull=xPb+(nPbW>>1)+((mvDisp[0]+nPbW*2+4+2)>>2);

yRefFull=yPb+(nPbH>>1)+((mvDisp[1]+nPbH*2+4+2)>>2);

xRef=Clip3(0,PicWidthInSamplesL−1,(xRefFull>>3)<<3); and

yRef=Clip3(0,PicHeightInSamplesL−1,(yRefFull>>3)<<3).

(Disparity Merge Candidate)

The disparity merge candidate derivation section 30373 derives thedisparity merge candidate (IvDC) and the shift disparity merge candidate(IvDCShift) from the disparity vector input from the disparity vectorderivation section 352. The disparity merge candidate derivation section30373 generates a vector which has a vertical component of 0 and thehorizontal component mvDisp[0] of the disparity vector (mvDisp[0],mvDisp[1]) of which the horizontal component is input, as the disparitymerge candidate (IvDC), by the following formulae.

mvL0IvDC[0]=DepthFlag?(mvDisp[0]+2)>>2: mvDisp[0]; and

mvL0IvDC[1]=0.

Here, DepthFlag is a variable which is 1 in the case of a depth.

The disparity merge candidate derivation section 30373 outputs thegenerated vector and the reference picture index refIdxLX (for example,the index of the base layer image having the same POC as a decodingtarget picture) of a previous layer image indicated by the disparityvector as merge candidates to the merge candidate storage section303611.

The disparity merge candidate derivation section 30373 derives a mergecandidate having a vector obtained by shifting the disparity mergecandidate in the horizontal direction as the shift disparity mergecandidate (IvDC) by the following formula.

mvLXIvDCShift[0]=mvL0IvDC[0]+4; and

mvLXIvDCShift[1]=mvL0IvDC[1].

(VSP Merge Candidate)

The VSP merge candidate derivation section 30374 (hereinafter referredto as the VSP prediction section 30374) derives a view synthesisprediction (VSP) merge candidate. The VSP prediction section 30374partitions the prediction unit into a plurality of sub-blocks(sub-prediction units) and sets the vector mvLX, the reference pictureindex refIdxLX, and the view IDRefViewIdx in the partition sub-blockunits. The VSP prediction section 30374 outputs the derived VSP mergecandidate to the merge candidate storage section 303611.

FIG. 14 is a block diagram illustrating a relation between the VSPprediction section 30374 and other means. The VSP prediction section30374 operates using a splitting flag horSplitFlag derived by asplitting flag derivation section 353 and a disparity vector derived bythe depth DV derivation section 351.

A partition splitting section (not illustrated) of the VSP predictionsection 30374 decides a sub-block size by selecting one of ahorizontally long rectangle (here, 8×4) and a vertically long rectangle(here, 4×8) according to the splitting flag horSplitFlag derived by thesplitting flag derivation section 353. Specifically, a width nSubBlkWand a height nSubBlkH of the sub-block are set using the followingformulae.

nSubBlkW=horSplitFlag?8:4; and

nSubBlkH=horSplitFlag?4:8.

A depth vector derivation section (not illustrated) of the VSPprediction section 30374 derives a vector mvLX[ ] using a motion vectordisparitySampleArray[ ] derived from the depth DV derivation section 351as a motion vector mvLX[0] of a horizontal component and using 0 as amotion vector mvLX[1] of a vertical component of each sub-block with thederived sub-block size, and derives a prediction parameter of the VSPmerge candidate.

The VSP prediction section 30374 may control whether to add the VSPmerge candidate to the merge candidate list mergeCandList according tothe residual prediction index iv_res_pred_weight_idx and theillumination compensation flag ic_flag input from the inter-predictionparameter decoding control section 3031. Specifically, the VSPprediction section 30374 may add the VSP merge candidate to thecomponent of the merge candidate list mergeCandList only in a case wherethe residual prediction index iv_res_pred_weight_idx is 0 and theillumination compensation flag ic_flag is 0.

The base merge candidate derivation section 30380 is configured toinclude a spatial merge candidate derivation section 30381, a temporalmerge candidate derivation section 30382, a coupled merge candidatederivation section 30383, and a zero merge candidate derivation section30384. The base merge candidate is a merge candidate used in the baselayer, that is, a merge candidate used for not scalable but HEVC (forexample, an HEVC main profile), and includes at least one of the spatialmerge candidate and the temporal merge candidate.

The spatial merge candidate derivation section 30381 reads theprediction parameters (the prediction use flag predFlagLX, the vectormvLX, and the reference picture index refIdxLX) stored by the predictionparameter memory 307 according to a predetermined rule and derives theread prediction parameters as spatial merge candidates. The readprediction parameters are prediction parameters related to adjacentblocks which are blocks within a pre-decided range from the predictionunit (for example, some or all of the blocks adjacent to the bottom leftend, the top left end, the top right end of the prediction unit). Thederived spatial merge candidates are stored in the merge candidatestorage section 303611.

The spatial merge candidate derivation section 30381 sets a VSP modeflag mergeCandIsVspFlag of a merge candidate derived in succession ofthe VSP mode flag VspModeFlag of the adjacent block. That is, in a casewhere the VSP mode flag VspModeFlag of the adjacent block is 1, the VSPmode flag mergeCandIsVspFlag of the corresponding spatial mergecandidate is set to 1. In other cases, the VSP mode flagmergeCandIsVspFlag is set to 0.

Hereinafter, the VSP mode flag VspModeFlag is set to 0 in the mergecandidates derived by the temporal merge candidate derivation section30382, the coupled merge candidate derivation section 30383, and thezero merge candidate derivation section 30384.

The temporal merge candidate derivation section 30382 reads theprediction parameters of a block in a reference image including thebottom right coordinates of the prediction unit from the predictionparameter memory 307 and sets the prediction parameters as mergecandidates. As a method of designating the reference image, the mergecandidate storage section 303611 stores merge candidates which may bederived when a collocated picture col_ref_idx designated by a sliceheader and the reference picture index refIdxLX designated withRefPicListX[col_ref_idx] designated from the reference picture listRefPicListX are used.

The coupled merge candidate derivation section 30383 derives coupledmerge candidates by combining the reference picture index and the vectorof two different derived merge candidates already derived and stored inthe merge candidate storage section 303611 as vectors of L0 and L1. Thederived merge candidates are stored in the merge candidate storagesection 303611.

The zero merge candidate derivation section 30384 derives mergecandidates in which the reference picture index refIdxLX is i and bothof the X and Y components of the vector mvLX are 0 until the number ofderived merge candidates reaches a maximum value. A vale of i indicatingthe reference picture index refIdxLX is allocated in sequence from 0.The derived merge candidates are stored in the merge candidate storagesection 303611.

The merge candidate selection section 30362 selects the merge candidatesto which indexes corresponding to the merge indexes merge_idx input fromthe inter-prediction parameter decoding control section 3031 areallocated as the inter-prediction parameters of a target PU among themerge candidates stored in the merge candidate storage section 303611.That is, when the merge candidate list is mergeCandList, the predictionparameter indicated by mergeCandList[merge_idx] is selected and outputto the bi-prediction restriction section 30363.

In a case where the interview merge candidate is selected as the mergecandidate, the merge candidate selection section 30362 sets a sub-blockmotion compensation flag subPbMotionFlag to 1. The merge candidateselection section 30362 may set the sub-block motion compensation flagsubPbMotionFlag to 1 even in a case where the VSP mode flag vspModeFlagof the merge candidate is 1. In other cases, the sub-block motioncompensation flag subPbMotionFlag is set to 0.

In a case of bi-prediction restriction condition 1 to be describedbelow, the bi-prediction restriction section 30363 convertsbi-prediction into uni-prediction by setting refIdxL1=−1 andpredFlagL1=0 in the reference picture index refIdxL1 of L1 and theprediction use flag predFlagL1 of L1.

Bi-prediction restriction condition 1: the selected prediction parameteris bi-prediction (predFlagL0=1 and predFlagL1) and the size of theprediction unit is less than a predetermined size (a sum of a widthnOrigPbW and a height nOrigPbH of the prediction unit is equal to 12).

The bi-prediction restriction section 30363 stores the selected mergecandidate in the prediction parameter memory 307 and outputs theselected merge candidate to the predicted image generation section 308.

predSamplesLX′[x][y]=predSamplesLX[x][y].

FIG. 10 is a schematic diagram illustrating the configuration of an AMVPprediction parameter derivation section 3032 according to theembodiment. The AMVP prediction parameter derivation section 3032includes a vector candidate derivation section 3033, a prediction vectorselection section 3034, and an inter-prediction identifier derivationsection 3035. The vector candidate derivation section 3033 reads thevectors stored by the prediction parameter memory 307 based on thereference picture indexes refIdx and generates the vector candidate listmvpListLX. The reference blocks are blocks located at pre-decidedpositions using the position of the prediction unit as a standard (forexample, blocks temporally adjacent to the bottom left end and the topright end of the prediction unit).

The prediction vector selection section 3034 selects, as the predictionvector mvpLX, the vector mvpListLX[mvp_lX_flag] indicated by theprediction vector flag mvp_LX_flag input from the inter-predictionparameter decoding control section 3031 among the vector candidatesmvpListLX derived by the vector candidate derivation section 3033. Theprediction vector selection section 3034 outputs the selected predictionvector mvpLX to the addition section 3035.

The addition section 3035 adds the prediction vector mvpLX input fromthe prediction vector selection section 3034 and the difference vectormvdLX input from the inter-prediction parameter decoding control sectionto calculate the vector mvLX. The addition section 3035 outputs thecalculated vector mvLX to the predicted image generation section 308.

FIG. 15 is a block diagram illustrating the configuration of theinter-prediction parameter decoding control section 3031 according tothe first embodiment of the invention. As illustrated in FIG. 15, theinter-prediction parameter decoding control section 3031 is configuredto include a partition mode decoding section 30311, an inter-predictionidentifier decoding section 30312, and a DBBP flag decoding section30313 and include a merge flag decoding section, a merge index decodingsection, an inter-prediction identifier decoding section, a referencepicture index coding section, a vector candidate index decoding section,a vector difference decoding section, a residual prediction indexdecoding section, and an illumination compensation flag decoding section(none of which are not illustrated). The partition mode decodingsection, the merge flag decoding section, the merge index decodingsection, the reference picture index decoding section, the vectorcandidate index decoding section, and the vector difference decodingsection decode the partition mode part_mode, the merge flag merge_flag,the merge index merge_idx, the inter-prediction identifierinter_pred_idc, the reference picture index refIdxLX, a predictionvector flag mvp_LX_flag, and the difference vector mvdLX, respectively.

The inter-prediction identifier decoding section 30312 decodes aninter-prediction identifier inter_pred_flag in which the prediction unitindicates L0 prediction (PRED_L0), L0 prediction (PRED_L1), orbi-prediction (PRED_BI).

In a case where the partition mode PartMode (part_mode) of the codingunit CU is 2N×2N, the residual prediction index decoding section usesthe entropy decoding section 301 to decode the residual prediction indexiv_res_pred_weight_idx from coded data. In other cases, the residualprediction index decoding section sets (infers) 0 iniv_res_pred_weight_idx. The residual prediction index decoding sectionoutputs the decoded residual prediction index iv_res_pred_weight_idx tothe merge mode parameter derivation section 3036 and the inter-predictedimage generation section 309. The residual prediction index is aparameter for changing an operation of residual prediction. In theembodiment, the residual prediction index is an index indicating weightof the residual prediction and has a value of 0, 1, or 2. In a casewhere iv_res_pred_weight_idx is 0, the residual prediction is notexecuted. The weight of the residual prediction may not be changedaccording to the index, but the vector used for the residual predictionmay be changed. A flag (residual prediction flag) indicating whether toexecute the residual prediction may be used rather than the residualprediction index.

In a case where the partition mode PartMode is 2N×2N, the illuminationcompensation flag decoding section uses the entropy decoding section 301to decode the illumination compensation flag ic_flag from the codeddata. In other cases, the illumination compensation flag decodingsection sets (infers) 0 in ic_flag. The illumination compensation flagdecoding section outputs the decoded illumination compensation flagic_flag to the merge mode parameter derivation section 3036 and theinter-predicted image generation section 309.

Hereinafter, the disparity vector derivation section 352, the splittingflag derivation section 353, and the depth DV derivation section 351which are means used to derive the prediction parameters will bedescribed in this order.

(Disparity Vector Derivation Section 352)

The disparity vector derivation section 352 extracts disparity vectors(hereinafter referred to as MvDisp[x][y] or mvDisp[x][y]) of a codingunit (target CU) to which a target PU belongs from blocks spatially ortemporally adjacent to the coding unit. Specifically, a block Coltemporally adjacent to the target CU, a second block AltCol temporallyadjacent to the target CU, a block A1 spatially left adjacent to thetarget CU, and a block B1 spatially top adjacent to the target CU areset as reference blocks, and the prediction flag predFlagLX, thereference picture index refIdxLX, and the vector mvLX of the referenceblocks are extracted in sequence. In a case where the extracted vectormvLX is a disparity vector, the disparity vectors of the adjacent blocksare output. In a case where there is no disparity vector in theprediction parameter of the adjacent block, the prediction parameter ofthe subsequent adjacent block is read and the disparity vector issimilarly derived. In a case where the disparity vectors may not bederived in all of the adjacent blocks, a zero vector is output as adisparity vector. The disparity vector derivation section 352 outputsthe reference picture index and the view ID (RefViewIdx[x][y], here (xP,yP) are coordinates) of the block in which the disparity vector isderived.

The disparity vector obtained as described above is referred to asneighbor base disparity vector (NBDV). The disparity vector derivationsection 352 outputs the further obtained disparity vector NBDV to thedepth DV derivation section 351. The depth DV derivation section 351derives a depth-originated disparity vector disparitySampleArray. Thedisparity vector is updated by setting the disparity vectordisparitySampleArray as a disparity vector, a horizontal componentmvLX[0] of a motion vector. The updated disparity vector is referred toas a depth orientated neighbor base disparity vector (DoNBDV). Thedisparity vector derivation section 352 outputs the disparity vector(DoNBDV) to the inter-layer merge candidate derivation section 30371,the disparity merge candidate derivation section, and a viewpointsynthesis prediction merge candidate derivation section. Further, theobtained disparity vector (NBDV) is output to the inter-predicted imagegeneration section 309.

(Splitting Flag Derivation Section 353)

The splitting flag derivation section 353 derives the splitting flaghorSplitFlag with reference to the depth image corresponding to a targetblock. The coordinates of the target block set as an input of thesplitting flag derivation section 353 are assumed to be (xP, yP), thewidth and the height are assumed to be nPSW and nPSH, and the disparityvector is assumed to be mvDisp in the following description. Thesplitting flag derivation section 353 may refer to the depth mage in acase where the width and the height of the target block are the same.However, in a case where the width and the height of the target blockare not the same, the splitting flag derivation section 353 may derivethe splitting flag horSplitFlag without referring to the depth image.Hereinafter, the details of the splitting flag derivation section 353will be described.

The splitting flag derivation section 353 reads the depth imagerefDepPels which has the same POC as the decoding target picture and hasthe same view ID as the view ID (RefViewIdx) of the reference pictureindicated by the disparity vector mvDisp, from the reference picturememory 306.

Next, the splitting flag derivation section 353 derives coordinates(xTL, yTL) obtained by shifting the top left coordinates (xP, yP) of thetarget block by the disparity vector MvDisp by the following formulae.

xTL=xP+((mvDisp[0]+2)>>2); and

yTL=yP+((mvDisp[1]+2)>>2).

Here, mvDisp[0] and mvDisp[1] are X and Y components of the disparityvector MvDisp, respectively. The derived coordinates (xTL, yTL) indicatethe coordinates of a block corresponding to the target block on thedepth image refDepPels.

The splitting flag derivation section 353 sets 1 in a flagminSubBlkSizeFlag by the following formula in a case where the widthnPSW or the height nPSH of the target block is a value other than amultiple of 8.

minSubBlkSizeFlag=(nPSW % 8!=0)∥(nPSH % 8!=0)

In a case where the flag minSubBlkSizeFlag is 1, the splitting flagderivation section 353 sets 1 in horSplitFlag by the following formulain a case where the height of the target block is value other than amultiple of 8 (a case where nPSH % 8 is true). The splitting flagderivation section 353 sets 0 in other cases.

horSplitFlag=(nPSH % 8!=0).

That is, in a case where the height of the target block is a value otherthan a multiple of 8 (a case where nPSH % 8 is true), 1 is set inhorSplitFlag. In a case where the width of the target block is a valueother than a multiple of 8 (a case where nPSW % 8 is true), 0 is set inhorSplitFlag.

The splitting flag derivation section 353 derives a sub-block size fromthe depth value. The sub-block size is derived by comparing four cornerpoints (TL, TR, BL, and BR) of the prediction block. In a case where theflag minSubBlkSizeFlag is 0 and a case where a pixel value of the depthimage at the coordinates of the top left end (TL) of the target block isrefDepPelsP0, a pixel value of the top right end (TR) is refDepPelsP1, apixel value of the bottom left end (BL) is refDepPelsP2, and a pixelvalue of the bottom right end (BR) is refDepPelsP3, it is determinedwhether the following conditional formula (horSplitFlag) is established:

horSplitFlag=(refDepPelsP0>refDepPelsP3)=(refDepPelsP1>refDepPelsP2).

The following formula in which codes are changed may be used in thederivation of horSplitFlag.

horSplitFlag=(refDepPelsP0<refDepPelsP3)=(refDepPelsP1<refDepPelsP2).

The splitting flag derivation section 353 outputs horSplitFlag to apartition mode derivation section 30954C and the VSP prediction section30374.

The splitting flag derivation section 353 may execute the derivation asfollows. In a case where the width nPSW and the height nPSH of thetarget block are different, horSplitFlag is derived according to thewidth and the height of the target block by the following formula.

horSplitFlag=1 when nPSW>nPSH; and

otherwise, horSplitFlag=0 when nPSH>nPSW.

Otherwise, horSplitFlag is derived with reference to the depth by thefollowing formula in a case where the width and the height of the targetblock are the same.

horSplitFlag=(refDepPelsP0>refDepPelsP3)==(refDepPelsP1>refDepPelsP2).

The target block of the splitting flag derivation section 353 is aprediction unit in the case of parallax synthesis prediction, and is ablock in which the width and the height are the same in the case ofDBBP. Since the width and the height are the same in the case of DBBP,the splitting flag horSplitFlag is derived with reference to fourcorners of the depth image in the foregoing derivation method.

(Depth DV Derivation Section 351)

The depth DV derivation section 351 derives a parallax arraydisparitySamples (horizontal vector) which is a horizontal component ofthe depth-originated disparity vector in the designated block unit(sub-block). Inputs of the depth DV derivation section 351 are the depthDV conversion table DepthToDisparityB, the width nBlkW and the heightnBlkH of the block, the splitting flag splitFlag, the depth imagerefDepPels, the coordinates (xTL, yTL) of a correspondence block on thedepth image refDepPels, and the view IDrefViewIdx. An output of thedepth DV derivation section 351 is the parallax array disparitySamples(horizontal vector). Through the following process, the depth DVderivation section 351 sets the pixels used to derive a depthrepresentative value maxDep for each target block. Specifically, asillustrated in FIG. 13, in a case where relative coordinates (xSubB,ySubB) from the top left prediction block (xTL, yTL) of the target blockare assumed to be (xSubB, ySubB), the X coordinate xP0 at the left endof the sub-block, the X coordinate xP1 at the right end thereof, the Ycoordinate yP0 at the top end, and the Y coordinate yP1 at the bottomend are obtained from the following formulae.

xP0=Clip3(0,pic_width_in_luma_samples−1,xTL+xSubB);

yP0=Clip3(0,pic_height_in_luma_samples−1,yTL+ySubB);

xP1=Clip3(0,pic_width_in_luma_samples−1,xTL+xSubB+nBlkW−1); and

yP1=Clip3(0,pic_height_in_luma_samples−1,yTL+ySubB+nBlkH−1).

Here, pic_width_in_luma_samples and pic_height_in_luma_samples indicatethe width and the height of an image, respectively.

Next, the depth DV derivation section 351 derives the representativevalue maxDep of the depth of the target block. Specifically, the depthDV derivation section 351 derives the representative depth value maxDepwhich is the maximum value of pixel values refDepPels[xP0][yP0],refDepPels[xP0][yP1], refDepPels[xP1][yP0], and refDepPels[xP1][yP1] ofdepth images at the corners of the sub-block and 4 points near thecorners by the following formulae.

maxDep=0;

maxDep=Max(maxDep,refDepPels[xP0][yP0]);

maxDep=Max(maxDep,refDepPels[xP0][yP1]);

maxDep=Max(maxDep,refDepPels[xP1][yP0]); and

maxDep=Max(maxDep,refDepPels[xP1][yP1]).

A function Max (x, y) is a function that returns x in a case where afirst argument x is equal to or greater than a second argument y andreturns y otherwise.

The depth DV derivation section 351 derives a parallax arraydisparitySamples which is the horizontal component of thedepth-originated disparity vector for each pixel (x, y) (where xreceives a value of nBlkW−1 from 0 and y receives a value of nBlkH−1from 0) in the target block using the representative depth value maxDep,the depth DV conversion table DepthToDisparityB, and the viewIDrefViewIdx of the layer indicated by the disparity vector (NBDV) bythe following formula.

disparitySamples[x][y]=DepthToDisparityB[refViewIdx][maxDep]  (formulaA).

The depth DV derivation section 351 outputs the derived parallax arraydisparitySamples[ ] as the disparity vector DoNBDV (a horizontalcomponent of this disparity vector) to the disparity vector derivationsection 352. The depth DV derivation section 351 also outputs thederived parallax array disparitySamples[ ] as the disparity vector (ahorizontal component of the disparity vector) to the VSP predictionsection 30374.

(Inter-Predicted Image Generation Section 309)

FIG. 16 is a schematic diagram illustrating the configuration of aninter-predicted image generation section 309 according to theembodiment. The inter-predicted image generation section 309 isconfigured to include a motion disparity compensation section 3091, aresidual prediction section 3092, an illumination compensation section3093, a DBBP prediction section 3095 (depth-based block predicted imagegeneration device 3095), and a weight prediction section 3096.

In a case where a sub-block motion compensation flag subPbMotionFlaginput from the inter-prediction parameter decoding section 303 is 1, theinter-predicted image generation section 309 executes the followingprocess in the sub-block unit. In a case where the sub-block motioncompensation flag subPbMotionFlag is 0, the inter-predicted imagegeneration section 309 executes the following process in units of theprediction units. In a case where the interview merge candidate or theVSP merge candidate is selected as a merge mode, the sub-block motioncompensation flag subPbMotionFlag becomes 1. The inter-predicted imagegeneration section 309 causes the motion disparity compensation section3091 to derive a predicted image predSamples using the predictionparameter. In a case where the residual prediction indexiv_res_pred_weight_idx is not 0, the inter-predicted image generationsection 309 sets 1 indicating that residual prediction is executed in aresidual prediction execution flag resPredFlag and outputs the residualprediction execution flag resPredFlag to the motion disparitycompensation section 3091 and the residual prediction section 3092.Conversely, in a case where the residual prediction indexiv_res_pred_weight_idx is 0, 0 is set in the residual predictionexecution flag resPredFlag and the residual prediction execution flagresPredFlag is output to the motion disparity compensation section 3091and the residual prediction section 3092.

The motion disparity compensation section 3091, the residual predictionsection 3092, the illumination prediction section 3093, and the DBBPprediction section 3095 each derive a motion compensated imagepredSamplesL0 of L0 or a motion compensated image predSamplesL1 of L1 ina case of the uni-prediction (predFlagL0=1 or predFlagL1=1), derive themotion compensated image predSamplesL0 of L0 and the motion compensatedimage predSamplesL1 of L1 in the case of the bi-prediction (predFlagL0=1and predFlagL1=1), and output the motion compensated images to theweight prediction section 3096. The weight prediction section 3096derives the predicted image predSamples from one motion compensatedimage predSamplesL0 or predSamplesL1 in the case of the uni-predictionand derives the predicted image predSamples from the two motioncompensated images predSamplesL0 and predSamplesL1 in the case of thebi-prediction.

(Motion Disparity Compensation)

The motion disparity compensation section 3091 generates a motionprediction image predSampleLX based on the prediction use flagpredFlagLX, the reference picture index refIdxLX, and the vector mvLX (amotion vector or a disparity vector). The motion disparity compensationsection 3091 generates, from the reference picture memory 306, apredicted image by executing reading interpolation on a block located ata position deviated by the vector mvLX when the position of theprediction unit of the reference picture designated by the referencepicture index refIdxLX is an origin. Here, in a case where the vectormvLX is not an integer vector, filtering called motion compensationfiltering (or disparity compensation filtering) is executed to generatea pixel at a decimal position to generate a predicted image. In general,in a case where the vector mvLX is a motion vector, the foregoingprocess is referred to as motion compensation. In a case where thevector mvLX is a disparity vector, the foregoing process is referred toas disparity compensation. Here, the foregoing processes arecollectively expressed as motion disparity compensation. Hereinafter, apredicted image of L0 prediction is referred to as predSamplesL0 and apredicted image of L1 prediction is referred to as predSamplesL1. In acase where both of the predicted images are not distinguished from eachother, the predicted images are referred to as predSamplesLX.Hereinafter, an example in which residual prediction and illuminationcompensation are executed on the predicted images predSamplesLX obtainedby the motion disparity compensation section 3091 will be described.These output images are also referred to as predicted imagespredSamplesLX. In a case where an input image and an output image aredistinguished from each other in the following residual prediction andillumination compensation, the input image is expressed as predSamplesLXand an output image is expressed as predSamplesLX′.

In a case where the residual prediction execution flag resPredFlag is 0,the motion disparity compensation section 3091 generates a motioncompensated image predSamplesLX by a motion compensation filter in whichluminance components are 8 taps and chroma components are 4 taps. In acase where the residual prediction execution flag resPredFlag is 1, themotion disparity compensation section 3091 generates a motioncompensated image predSamplesLX by a motion compensation filter in whichluminance components are 2 taps and chroma components are 2 taps.

In a case where the sub-block motion compensation flag subPbMotionFlagis 1, the motion disparity compensation section 3091 executes motioncompensation in the sub-block unit. Specifically, the vector, thereference picture index, and the reference list use flag of a sub-blockat coordinates (xCb, yCb) are derived from the following formulae.

MvL0[xCb+x][yCb+y]=subPbMotionFlag?SubPbMvL0[xCb+x][yCb+y]:mvL0;

MvL1[xCb+x][yCb+y]=subPbMotionFlag?SubPbMvL1[xCb+x][yCb+y]:mvL1;

RefIdxL0[xCb+x][yCb+y]=subPbMotionFlag?SubPbRefIdxL0[xCb+x][yCb+y]:refIdxL0;

RefIdxL1[xCb+x][yCb+y]=subPbMotionFlag?SubPbRefIdxL1[xCb+x][yCb+y]:refIdxL1;

PredFlagL0[xCb+x][yCb+y]=subPbMotionFlag?SubPbPredFlagL0[xCb+x][yCb+y]:predFlagL0;and

PredFlagL1[xCb+x][yCb+y]=subPbMotionFlag?SubPbPredFlagL1[xCb+x][yCb+y]:predFlagL1.

Here, SubPbMvLX, SubPbRefIdxLX, SubPbPredFlagLX (where X is 0 or 1)correspond to subPbMvLX, subPbRefIdxLX, and subPbPredFlagLX described inthe inter-layer merge candidate derivation section 30371.

(Residual Prediction)

The residual prediction section 3092 executes residual prediction in acase where the residual prediction execution flag resPredFlag is 1. Theresidual prediction section 3092 outputs the input predicted imagepredSamplesLX without change in a case where the residual predictionexecution flag resPredFlag is 0. The residual prediction ofrefResSamples is executed by estimating a residual of the motioncompensated image predSamplesLX generated in the motion prediction orthe disparity prediction and adding the residual to the predicted imagepredSamplesLX of a target layer. Specifically, in a case where theprediction unit is motion prediction, the same residual as the referencelayer is assumed to also occur in the target layer and the alreadyderived residual of the reference layer is used as an estimated value ofthe residual of the target layer. In a case where the prediction unit isdisparity prediction, the residuals of the picture of the referencelayer at the different time (POC) from the target picture and thepicture of the target layer are used as estimated values of theresiduals.

The residual prediction section 3092 also executes the residualprediction in the sub-block unit in a case where the sub-block motioncompensation flag subPbMotionFlag is 1, as in the motion disparitycompensation section 3091.

FIG. 17 is a block diagram illustrating the configuration of theresidual prediction section 3092. The residual prediction section 3092is configured to include a reference image interpolation section 30922and a residual synthesis section 30923.

In a case where the residual prediction execution flag resPredFlag is 1,the reference image interpolation section 30922 generates two residualprediction motion compensated images (correspondence block rpSamplesLXand a reference block rpRefSamplesLX) using the vector mvLX and theresidual prediction disparity vector mvDisp input from theinter-prediction parameter decoding section 303, and the referencepicture stored in the reference picture memory 306.

The residual prediction section 3092 derives an interview predictionflag ivRefFlag which is a flag indicating whether the target block isthe motion prediction or the disparity prediction by (DiffPicOrderCnt(currPic, RefPicListX[refIdxLX])==0). Here, DiffPicOrderCnt (X, Y)indicates a difference of the POC of the pictures X and Y (the sameapplies below). Accordingly, in a case where the POC of a target picturecurrPic and the POC of the reference picture RefPicListX[refIdxLX]indicated by the reference picture index refIdxLX and the referencepicture list RefPicListX are 0, the disparity prediction is applied tothe target block and 1 is set in ivRefFlag. In other cases, the motionprediction is applied to the target block and 0 is set in ivRefFlag.

FIG. 18 is a diagram illustrating the correspondence block rpSamplesLXand the reference block rpRefSamplesLX in a case where the vector mvLXis a motion vector (a case in the interview prediction flag ivRefFlag is0). As illustrated in FIG. 18, the correspondence block corresponding tothe prediction unit on the target layer is located in a block located ata position deviated by the disparity vector mvDisp which is a vectorindicating a positional relation between the reference layer and thetarget layer when the position of the prediction unit of an image on thereference layer is an origin.

FIG. 19 is a diagram illustrating the correspondence block rpSamplesLXand the reference block rpRefSamplesLX in a case where the vector mvLXis a disparity vector (the interview prediction flag ivRefFlag is 1). Asillustrated in FIG. 19, the correspondence block rpSamplesLX is a blockon the reference picture rpPic which has a different time from thetarget picture and the same view ID as the target picture. The residualprediction section 3092 derives mvT which is a vector of the predictionunit on a destination picture mvPicT designated by the vector mvLX (=thedisparity vector mvDisp) of the target block. The correspondence blockrpSamplesLX is located in a block located at a position deviated by thevector mvT when the position of the prediction unit (target block) is anorigin.

(Derivation of Residual Prediction Reference Picture)

The residual prediction section 3092 derives reference pictures rpPicand rpPicRef which are reference pictures referred to in derivation ofresidual prediction motion compensated images (rpSamplesLX andrpRefSamplesLX) and vectors mvRp and mvRpRef indicating the position ofa reference block (the relative coordinates of the reference block whenthe coordinates of the target block are a standard).

The residual prediction section 3092 sets a picture which has the samedisplay time (POC) as a target picture to which the target block belongsor the same view ID as rpPic.

Specifically, in a case where the target block is the motion prediction(a case where the interview prediction flag ivRefFlag is 0), the POC ofthe reference picture rpPic is the same as PicOrderCntVal which is thePOC of the target picture and the view ID of the reference picture rpPicis the same as a reference view IDRefViewIdx[xP][yP] (which is differentfrom th view ID of the target picture) of the prediction unit in theresidual prediction section 3092. The reference picture rpPic is derivedfrom this condition. Further, the residual prediction section 3092 setsthe disparity vector MvDisp in the vector mvRp of the foregoing rpPic.

In a case where the target block is the disparity prediction (a casewhere the interview prediction flag ivRefFlag is 1), the residualprediction section 3092 sets rpPic in the reference picture used togenerate the predicted image of the target block. That is, in a casewhere the reference index of the target block is RpRefIdxLY and thereference picture list is RefPicListY, the reference picture rpPic isderived from RefPicListY[RpRefIdxLY]. The residual prediction section3092 further includes a residual prediction vector derivation section30924 (not illustrated). The residual prediction vector derivationsection 30924 derives mvT which is a vector of the prediction unit on apicture which has a different view ID and the same POC as the targetpicture of the destination indicated by the vector mvLX (which is thesame as the disparity vector MvDisp) of the target block in the vectormvRp of the foregoing rpPic, and sets mvRp in the motion vector mvT.

Next, the residual prediction section 3092 sets the reference picturewhich has a different display time (POC) from the target picture and thedifferent view ID as rpPicRef.

Specifically, in a case where the target block is the motion prediction(a case where the interview prediction flag ivRefFlag is 0), theresidual prediction section 3092 derives the reference picture rpPicReffrom the condition that the POC of the reference picture rpPicRef is thesame as the POC of the reference picture RefPicListY[RpRefIdxLY] of thetarget block and the view ID of the reference picture rpPicRef is thesame as the view IDRefViewIdx[xP][yP] of the reference picture of thedisparity vector MvDisp. Further, the residual prediction section 3092sets a sum (mvRp+mvLX) of the vector mvRp and the vector mvLX obtainedby scaling the motion vector of the prediction block to the vectormvRpRef of the foregoing rpPicRef.

In a case where the target prediction unit is the disparity prediction(the case where the interview prediction flag ivRefFlag is 1), theresidual prediction section 3092 derives the reference picture rpPicReffrom the condition that the POC of the reference picture rpPicRef issame as the POC of the reference picture rpPic and the view ID of thereference picture rpPicRef is the same as the view IDRefViewIdx[xP][yP]of the prediction unit. Further, the residual prediction section 3092sets a sum (mvRp+mvLX) of the motion vector mvLX of the prediction blockand the vector mvRp in the vector mvRpRef of the foregoing rpPicRef.

That is, the residual prediction section 3092 derives mvRp and mvRpRefin the following way.

In the case where the interview prediction flag ivRefFlag is 0,

mvRp=MvDisp  formula (B-1); and

mvRpRef=mvRp+mvLX(=mvLX+MvDisp)  formula (B-2).

In the case where the interview prediction flag ivRefFlag is 1,

mvRp=mvT  formula (B-3); and

mvRpRef=mvRp+mvLX(=mvLX+mvT)  formula (B-4).

(Residual Prediction Vector Derivation Section 30924)

The residual prediction vector derivation section 30924 derives thevector mvT of the prediction unit on a different picture from the targetpicture. The residual prediction vector derivation section 30924receives the reference picture, the target block coordinates (xP, yP),the target block sizes nPSW and nPSH, and the vector mvLX as inputs andderives the vector mvT and the view ID from the motion compensationparameters (the vector, the reference picture index, and the view ID) ofthe prediction unit on the reference picture. The residual predictionvector derivation section 30924 derives reference coordinates (xRef,yRef) as the central coordinates of a block located at a positiondeviated by the vector mvLX from the target block on the referencepicture instructed as an input by the following formulae.

xRef=Clip3(0,PicWidthInSamplesL−1,xP+(nPSW>>1)+((mvDisp[0]+2)>>2)); and

yRef=Clip3(0,PicHeightInSamplesL−1,yP+(nPSH>>1)+((mvDisp[1]+2)>>2)).

The residual prediction vector derivation section 30924 derives areference picture index refPicLX and a vector mvLX of refPU which is theprediction unit including the reference block coordinates (xRef, yRef).In a case in the target prediction unit is the disparity prediction(DiffPicOrderCnt (currPic, refPic) is 0) or the reference predictionunit refPU is the motion prediction (DiffPicOrderCnt (refPic,refPicListRefX[refIdxLX]) is a value other than 0), a vector of refPU isset to mvT and a referable flag availFlagT is set to 1. Through theforegoing process, a vector of a block in which a picture having thesame POC as the target picture and a different view ID is a referencepicture is can be derived as mvT.

The residual prediction vector derivation section 30924 derives a vectorof the prediction unit on a different picture from the target picture.The residual prediction vector derivation section 30924 receives thetarget block coordinates (xP, yP), the target block sizes nPbW and nPbH,and the disparity vector mvDisp as inputs and derives the followingreference block coordinates (xRef, yRef).

xRef=Clip3(0,PicWidthInSamplesL−1,xP+(nPSW>>1)+((mvDisp[0]+2)>>2)); and

yRef=Clip3(0,PicHeightInSamplesL−1,yP+(nPSH>>1)+((mvDisp[1]+2)>>2)).

The residual prediction vector derivation section 30924 derives thereference picture index refPicLX and the vector mvLX of refPU which isthe prediction unit including the reference block coordinates (xRef,yRef). In a case where the target prediction unit is the motionprediction (DiffPicOrderCnt (currPic, refPic) is a value other than 0)and the reference prediction unit refPU is the disparity prediction(DiffPicOrderCnt (refPic, refPicListRefX[refIdxLX]) is 0), the referableflag availFlagT is set to 1. Accordingly, a vector of a block in which apicture having the same POC as the target picture and a different viewID is a reference picture is can be derived as mvT.

(Reference Image Interpolation Section 30922)

The reference image interpolation section 30922 sets the vector mvC inthe vector mvLX and generates the compensated image of the referenceblock rpSamplesLX. A pixel located at a position deviated by the vectormvLX of the prediction unit from the coordinates (x, y) of the pixel ofthe interpolated image is derived through linear interpolation (bilinearinterpolation). Considering that the disparity vector LX has quarter-peldecimal precision, the reference image interpolation section 30922derives an X coordinate xInt and a Y coordinate yInt of a pixel R0 withcorresponding integer precision and a decimal part xFrac of the Xcomponent and a decimal part yFrac of the Y component of the disparityvector mvDisp in a case where the coordinates of the pixel of theprediction unit are (xP, yP) by the following (formula C-1):

xInt=xPb+(mvLX[0]>>2);

yInt=yPb+(mvLX[1]>>2);

xFrac=mvLX[0] & 3; and

yFrac=mvLX[1] & 3.

Here, X & 3 is a mathematical formula that extracts only 2 lower bits ofX.

Next, the reference image interpolation section 30922 generates aninterpolated pixel predPartLX[x][y] in consideration of the fact thatthe vector mvLX has the quarter-pel decimal precision. First, thecoordinates of integer pixels A(xA, yB), B(xB, yB), C(xC, yC), and D(xD,yD) are derived by the following (formulae C-2):

xA=Clip3(0,picWidthInSamples−1,xInt);

xB=Clip3(0,picWidthInSamples−1,xInt+1);

xC=Clip3(0,picWidthInSamples−1,xInt);

xD=Clip3(0,picWidthInSamples−1,xInt+1);

yA=Clip3(0,picHeightInSamples−1,yInt);

yB=Clip3(0,picHeightInSamples−1,yInt);

yC=Clip3(0,picHeightInSamples−1,yInt+1); and

yD=Clip3(0,picHeightInSamples−1,yInt+1).

Here, the integer pixel A is a pixel corresponding to the pixel R0, andthe integer pixels B, C, and D are pixels which have integer precisionand are adjacent to the right, bottom, and bottom right of the integerpixel A, respectively. The reference image interpolation section 30922reads reference pixels refPicLX[xA][yA], refPicLX[xB][yB],refPicLX[xC][yC], and refPicLX[xD][yD] corresponding to the integerpixels A, B, C, and D, respectively, from the reference picture memory306.

The reference image interpolation section 30922 derives interpolatedpixels predPartLX[x][y] which are pixels at positions deviated by thedecimal part of the vector mvLX from the pixel R0 through linearinterpolation (bilinear interpolation) using the reference pixelsrefPicLX[xA][yA], refPicLX[xB][yB], refPicLX[xC][yC], andrefPicLX[xD][yD] and the decimal part xFrac of the X component and thedecimal part yFrac of the Y component of the vector mvLX. Specifically,the derivation is executed by the following formula (C-3):

predPartLX[x][y]=(refPicLX[xA][yA]*(8−xFrac)*(8−yFrac)+refPicLX[xB][yB]*(8−yFrac)*xFrac+refPicLX[xC][yC]*(8−xFrac)*yFrac+refPicLX[xD][yD]*xFrac*yFrac)>>6.

The interpolated pixel has been derived above by bilinear interpolationof one step using the four pixels around the target pixel. However,linear interpolation in the horizontal direction and linearinterpolation in the vertical direction may be separated and theresidual prediction interpolation image may be generated through thelinear interpolation of two steps.

The reference image interpolation section 30922 executes the foregoinginterpolated pixel derivation process on each pixel in the predictionunit and sets a set of the interpolated pixels as an interpolated blockpredPartLX. The reference image interpolation section 30922 outputs thederived interpolated block predPartLX as the correspondence blockrpSamplesLX to the residual synthesis section 30923.

The reference image interpolation section 30922 executes the sameprocess as the process of deriving the correspondence block rpSamplesLX,excluding the fact that the disparity vector mvLX is substituted withthe vector mvR, to derive the reference block rpRefSamplesLX. Thereference image interpolation section 30922 outputs the reference blockrpRefSamplesLX to the residual synthesis section 30923.

(Residual Synthesis Section 30923)

In the case where the residual prediction execution flag resPredFlag is1, the residual synthesis section 30923 derives a predicted image byderiving a residual from a difference between two residual predictionmotion compensated images (rpSamplesLX and rpRefSamplesLX) and addingthe residual to the motion compensated image. Specifically, the residualsynthesis section 30923 derives a compensated predicted imagepredSamplesLX′ from the predicted image predSamplesLX, thecorrespondence block rpSamplesLX, the reference block rpRefSamplesLX,and the residual prediction index iv_res_pred_weight_idx. Thecompensated predicted image predSamplesLX′ is obtained using thefollowing formula:

predSamplesLX′[x][y]=predSamplesLX[x][y]+((rpSamplesLX[x][y]−rpRefSamplesLX[x][y])>>(iv_res_pred_weight_idx−1)).

Here, x is the width of the prediction block−1 from 0 and y is theheight of the prediction block−1 from 0. In the case where the residualprediction execution flag resPredFlag is 0, the residual synthesissection 30923 outputs the predicted image predSamplesLX without changeas in the following formula.

predSamplesLX′[x][y]=predSamplesLX[x][y].

(Illumination Compensation)

In the case where the illumination compensation flag ic_flag is 1, theillumination compensation section 3093 executes illuminationcompensation on the input predicted image predSamplesLX. In the casewhere the illumination compensation flag ic_flag is 0, the inputpredicted image predSamplesLX is output without change.

(Weight Prediction)

In the case of uni-prediction (predFlagL0=1/predFlagL1=0 orpredFlagL0=0/predFlagL1=1), the weight prediction section 3096 derives apredicted image predSamples from a motion compensated image predSampleL0of L0 or a motion compensated image predSampleL1 of L1. Specifically,the predicted image is derived in the prediction from L0 and theprediction from L1 using the following formulae.

predSamples[x][y]=Clip3(0,(1<<bitDepth)−1,predSamplesL0[x][y]*w0+o0);and

predSamples[x][y]=Clip3(0,(1<<bitDepth)−1,predSamplesL1[x][y]*w1+o1).

Here, w0, w1, o0, and o1 are weights and offsets coded with theparameter set, respectively. bitDepth is a value of a bit depth.

In the case of bi-prediction (predFlagL0=1/predFlagL1=1), the weightprediction section 3096 generates a predicted image from weightedprediction of the motion compensated image predSampleL0 of L0 or themotion compensated image predSampleL1 of L1.

(predSamplesL0[x][y]*w0+predSamplesL1[x][y]*w1+((o0+o1+1)<<log2Wd))>>(log 2Wd+1)).

Here, w0, w1, o0, o1, and log 2Wd are values of weights and offsetscoded with the parameter set, respectively. bitDepth is a value of a bitdepth.

(DBBP Prediction)

In a case where the DBBP flag dbbp_flag is 1, the DBBP predictionsection 3095 generates a predicted image predSamples by depth-basedblock partitioning (DBBP). In the depth-based block partitioning, atarget block is partitioned into two regions (regions 1 and 2) based onsegmentation of a depth image corresponding to the target block. Thesegmentation indicating region partition of an interpolated image ofregion 1 (hereinafter referred to as predSamplesA) and an interpolatedimage of region 2 (hereinafter referred to as predSamplesB) is derivedand one interpolated image (predicted image) is generated bysynthesizing the two interpolated images according to the segmentation.

Since appropriate partition is executing based on the depth image inDBBP, actually applied partition (segmentation) is different from thepartition mode (PartMode) decoded from coded data. The predictionparameters such as a motion vector decoded from the coded data is usedto derive the prediction parameter of a subsequent prediction unit or aprediction unit of another picture, it is appropriate to store aprediction parameter applied to DBBP using a partition mode close to theactual partition (segmentation) as much as possible. Accordingly, in theDBBP prediction section 3095, the partition mode PartMode from the depthimage is derived by a DBBP partition mode derivation section 3094 to bedescribed below. The DBBP prediction section 3095 substitutes thepartition mode obtained through the decoding with the derived partitionmode PartMode. The prediction parameter decoded by the inter-predictionparameter decoding control section 3031 is stored in the predictionparameter memory 307 according to the substituted partition modePartMode. The segmentation indicates partition in units of pixels andthe partition mode indicates partition in units of rectangles set inadvance.

FIG. 1 is a block diagram illustrating the configuration of the DBBPprediction section 3095 according to the embodiment of the presentinvention. The DBBP prediction section 3095 is configured to include aDBBP image interpolation section 30951, a segmentation section 30952, animage synthesis section 30953, and a DBBP partition mode derivationsection 3094. Operations of the segmentation section 30952 and the DBBPpartition mode derivation section 30954 may also be executed by theprediction parameter decoding section 302 rather than a predicted imagegeneration section 101.

(DBBP Image Interpolation Section 30951)

The DBBP image interpolation section 30951 generates two interpolatedimages (predSamplesA and predSamplesB) through bilinear interpolation onreference picture lists L0 and L1 based on two vectors input to the DBBPprediction section 3095. An operation of the DBBP image interpolationsection 30951 on the bilinear interpolation is the same as an operationof the ARP reference image interpolation section 30922. First, integerpositions xInt and yInt and phases xFrac and yFrac are derived from themotion vector mvLX by (formula C-1). Next, the positions of pixelsrefPicLx[xA][yA], refPicLx[xB][yB], refPicLx[xC][yC], andrefPicLx[xD][yD] of four points are derived by (formula C-2). Finally,pixels are interpolated from the four points according to the phasesxFrac and yFrac by (formula C-3). An image interpolation sectionexecuting common bilinear interpolation may be used as the ARP referenceimage interpolation section 30922 and the DBBP image interpolationsection 30951.

Two interpolated images are distinguished by partIdx that has 0 or 1.That is, the DBBP image interpolation section 30951 derives aninterpolated image predSamples of partIdx=0 or an interpolated imagepredSamples of partIdx=1. When the interpolated image predSamples ofpartIdx=0 is assumed to be predSamplesA, the interpolated imagepredSamples of partIdx=1 can be expressed as predSamplesB.

The segmentation section 30952 derives segmentation information segMaskfrom a depth block corresponding to a target block input from thereference picture memory 306. A depth block corresponding to the targetblock is a block in which has the same POC as a decoding target pictureand in which coordinates (xP+mvDisp[0] and xP+mvDisp[1]) on an image ofa depth picture having the same view ID as the view ID (RefViewIdx) ofthe reference picture indicated by the disparity vector MvDisp are topleft coordinates. Here, (xP, yP) indicate coordinates of the targetblock and MvDisp indicates a disparity vector MvDisp of the targetblock.

Specifically, the segmentation section 30952 derives a representativevalue thresVal of a pixel value of the depth block. In a case where eachpixel value of the depth block is greater than the representative valuethresVal, the segmentation section 30952 derives 1 as segMask[ ][ ]. Ina case where each pixel value is equal to or less than therepresentative value thresVal, the segmentation section 30952 0 assegMask[ ][ ].

Specifically, the representative value thresVal is derived by thesegmentation section 30952 by deriving a sum sumRefVals of the depthpixel refSamples[x][y] in each pixel (x=0, nCbSl−1, y=0 . . . x and y ofnCbSL−1) forming a depth block by the following formula and executingright shift by a value equivalent to a logarithm of 2 of a depth blocksize nCbSL.

for (y=0; y<=nCbSL−1; y++)

for (x=0; x<=nCbSL−1; x++)

sumRefVals+=refSamples[x][y]

threshVal=(sumRefVals>>(2*log 2(nCbSL)))

segMask[ ][ ] is derived by the segmentation section 30952 by obtaininga boolean value of whether the depth pixel refSamples[x][y] exceeds therepresentative value thresVal in each pixel (x=0 . . . nCbSL−1, y=0 . .. x and y of nCbSL−1) included in the depth block by the followingformula.

segMask[x][y]=(refSamples[x][y]>threshVal).

segMask[x][y] is a block (segmentation information) which has the samesize as the target block and each pixel value of 0 or 1.

The image synthesis section 30953 derives the interpolated imagepredSamplesLX from segMask derived by the segmentation section 30952 andthe two interpolated images (predSamplesA and predSampleB) derived bythe DBBP image interpolation section 30951 in regard to the referencepicture lists L0 and L1. The derived interpolated images predSamplesL0and predSamplesL1 are output to the weight prediction section 3096.

FIG. 21 is a diagram illustrating the image synthesis section 30953. Theimage synthesis section 30953 selects any one of the two interpolatedimages in units of pixels based on the segmentation information segMaskand derives a predicted image predSamplesLX (here, PredSamplesDbbp) byfurther executing a filtering process.

Specifically, the image synthesis section 30953 first sets theinterpolated image predSamples in the predicted image predSamplesDbbpaccording to values of partIdx for distinguishing the two interpolatedimages and the segmentation information segMask[x][y].

The image synthesis section 30953 may select the pixels from the twointerpolated images based on the top left pixel segMask[0][0] ofsegMask. In this case, the image synthesis section 30953 selects thepixels from the interpolated image corresponding to partIdx differentfrom segMask[0][0] as follows. The image synthesis section 30953 derivesa flag curSegmentFlag indicating whether the values of segMask[0][0] andpartIdx are the same by the following formula.

curSegmentFlag=(partIdx!=segMask[0][0]).

For a pixel in which the segmentation information segMask[x][y] at apixel position (x, y) is the same as the foregoing curSegmentFlag, aninterpolated image predSamples[x][y] (predSamplesL[x][y],predSamplesCb[x][y], PredSamplesCr[x][y]) corresponding to a targetpartIdx is allocated to an interpolated image predSamplesDbbp[x][y](predSamplesDbbpLX[x][y], predSamplesDbbpCb[x][y],predSamplesDbbpCr[x][y]). For example, in a case where partIdx is 0 andthe segmentation information segMask[0][0] of the top left pixel of ablock is 0, the interpolated image predSamples[x][y] of partIdx=0 is setin PredSamplesDbbp[x][y] when the segmentation information segMask[x][y]of each pixel is 0 ((partIdx !=segMask[0][0])=(0!=0)=0). At this time,when the segmentation information segMask[x][y] of each pixel is 1, aninterpolated image predSamples[x][y] of partIdx=1 is set inPredSamplesDbbp[x][y]. In a case where partIdx is 0 and the segmentationinformation segMask[0][0] of the top left pixel of a block is 1, theinterpolated image predSamples[x][y] of partIdx=0 is set inPredSamplesDbbp[x][y] when the segmentation information segMask[x][y] ofeach pixel is 1 ((partIdx !=segMask[0][0])=(0!=1)=1). At this time, whenthe segmentation information segMask[x][y] of each pixel is 0, aninterpolated image predSamples[x][y] of partIdx=1 is set inPredSamplesDbbp[x][y].

In conclusion, the image synthesis section 30953 allocates theinterpolated image predSamples to the predicted image PredSampleDbbpaccording to the segmentation information segMask[x][y] of each pixel bythe following formula.

for (y = 0; y < nCbSL; y++) {  for (x = 0; x < nCbSL; x++) { if(segMask[x][y] == (partIdx ! = segMask[0][0]))  PredSamplesDbbpL[x][y] =predSamplesL[x][y]  if ((x % 2 == 0) && (y % 2 == 0)) {PredSamplesDbbpCb[x/2][y/2] = predSamplesCb[x/2][y/2]PredSamplesDbbpCr[x/2][y/2] = predSamplesCr[x/2][y/2]  } }  }

The image synthesis section 30953 further applies a filter to each pixelaccording to the segmentation information segMask[x][y]. The imagesynthesis section 30953 applies another filter according to thepartition mode. Specifically, the image synthesis section 30953 appliesa filter in the horizontal direction according to the segmentationinformation in a case where a target PU is vertically long (a case wherepartMode is N×2N). The image synthesis section 30953 applies a filter inthe horizontal direction according to the segmentation information in acase where the target PU is horizontally long (a case where partMode is2N×N).

Specifically, in the case where the target PU is vertically long (a casewhere partMode is N×2N), the image synthesis section 30953 refers to thesegmentation information cFlag (=segMask[x][y]) of a target pixel, thesegmentation information lFlag (=segmask[x−1][y]) of a pixel adjacent onthe left side, and the segmentation information rFlag (segMask[x+1][y])of a pixel adjacent to the right side. In a case where the pieces ofsegmentation information are different, a filter using a weight of 1:2:1to the left pixel p[x−1][y], the target pixel p[x][y], and the rightpixel p[x+1][y] is applied.

In a case where the target PU is horizontally long (partMode is 2N×N),the image synthesis section 30953 refers to segmentation informationcFlag (=segMask[x][y]) of a target pixel, segmentation information tFlag(=segMask[x][y−1]) of a pixel adjacent to the top side, and segmentationinformation bFlag (=segMask[x][y+1]) of a pixel adjacent to the bottomside. In a case where the pieces of segmentation information aredifferent, a filter using a weight of 1:2:1 to the top pixel p[x][y−1],the target pixel p[x][y], and the bottom pixel p[x][y+1] is applied.Pseudocodes of this process are as follows.

for (y = 0; y < nCbSX; y++)  for (x =0; x < nCbSX; x++) { cFlag =segMask[n * x][n * y] if (partMode = N×2N) {  lFlag = segMask[Max(0,(n * (x − 1))][n * y]  rFlag = segMask[Min(n * (x + 1), nCbSL − 1)][n *y]  if ((lFlag || cFlag || rFlag) && (! lFlag || ! cFlag || !rFlag)) condition A-1 predSamples[x][y] = (p[Max(0, x − 1)][y] +(p[x][y] << 1) + p[Min(x + 1, nCbSX − 1)][y]) >> 2 formula B-1  } else{// partMode = 2N×N tFlag = segMask[n * x][Max(0, n * (y − 1))] bFlag =segMask[n * x][Min(n * (y + 1), nCbSL − 1)] if ((tFlag || cFlag ||bFlag) && (! tFlag || ! cFlag || ! bFlag)) condition A-2 predSamples[x][y] = (p[x][Max(0, y − 1)] + (p[x][y] << 1) +p[x][Min(y + 1, nCbSX − 1)]) >> 2 formula B-2 }  }

Here, nCbSx indicates the size of a target block, cFlag, lFlag, rFlag,tFlag, and bFlag are pieces of segmentation information of a targetpixel, a left adjacent pixel, a right adjacent pixel, a top adjacentpixel, and a bottom adjacent pixel, p[x][y] is an image before filtering(a blended image predSamplesDbbp), predSamples[x][y] is an imagesubjected to a filtering process, and n is an integer of 1 in luminanceand is an integer of 2 in chroma. In general, luminance has resolutionwhich is twice chroma and the segmentation information is generated withthe resolution of luminance. Accordingly, for the segmentationinformation, segmentation information of resolution of luminance can bereferred to even in chroma by referring to segMask[n*x][n*y] or the likeand coordinates multiplied by n (n*x, n*y).

Condition A-1 indicates that one of lFlag, cFlag, and rFlag is 1 and oneof lFlag, cFlag, and rFlag is 0 and corresponds to a case other than acase where all of lFlag, cFlag, and rFlag are 1 or 0. In the end,condition A-1 is identical to the following condition A-1′ indicatingthat cFlag and lFlag are different or cFlag and rFlag are different.

(cFlag !=lFlag)∥(cFlag !=rFlag)  condition A-1′.

Similarly, condition A-2 indicates that one of tFlag, cFlag, and bFlagis 1 and one of tFlag, cFlag, and bFlag is 0 and tFlag and lFlag aredifferent or is identical to the following condition A-2′ indicatingcFlag and bFlag are different.

(cFlag !=tFlag)∥(cFlag !=bFlag)  condition A-2′.

Max(0, n*(x−1)), Max(0, n*(y−1)), Min(n*(x+1), nCbSL−1), Min(n*(y+1),nCbSL−1) are a process of executing clipping so that coordinates of left(x−1), bottom (y−1), right (x+1), and top (y−1) of the position (x, y)of a target image are in the same CU as a target CU.

A rounding constant of the filter with the weight of 1:2:1 is 0indicating cutoff, but may be 2 indicating round-off. That is, theprocesses of formulae B-1 and B-2 may be substituted with processes ofthe following formulae B-1A and B-2A.

predSamples[x][y]=(p[Max(0,x−1)][y]+(p[x][y]<<1)+p[Min(x+1,nCbSX−1)][y]+2)>>2  formulaB-1A; and

predSamples[x][y]=(p[x][Max(0,y−1)]+(p[x][y]<<1)+p[x][Min(y+1,nCbSX−1)]+2)>>2  formulaB-2A.

In this case, pseudocodes of the image synthesis section 30953 are asfollows.

for (y = 0; y < nCbSX; y++)  for(x =0; x < nCbSX; x++) { cFlag =segMask[n * x][n * y] if (partMode = N×2N) { lFlag = segMask[Max(0, (n *(x − 1))][n * y] rFlag = segMask[Min(n * (x + 1), nCbSL − 1)][n * y] if((lFlag || cFlag || rFlag) && (! lFlag || ! cFlag || ! rFlag))predSamples[x][y] = (p[Max(0, x − 1)][y] + (p[x][y] << 1) + p[Min(x + 1,nCbSX − 1)][y] + 2) >> 2 formula B-1A } else {// partMode = 2N×N tFlag =segMask[n * x][Max(0, n * (y − 1))] bFlag = segMask[n * x][Min(n * (y +1), nCbSL − 1)] if ((tFlag || cFlag || bFlag) && (! tFlag || ! cFlag ||! bFlag))  predSamples[x][y] = (p[x][Max(0, y − 1)] + (p[x][y] << 1) +p[x][Min(y + 1, nCbSX − 1)] + 2) >> 2 formula B-2A  }  }

Comparative Example

A DBBP prediction section 30950 according to a comparative example isconfigured to include a DBBP image interpolation section 30951, asegmentation section 30952, an image synthesis section 309530, and aDBBP partition mode derivation section 3094.

The image synthesis section 309530 applies a filter to each pixelaccording to the segmentation information segMask[x][y]. Specifically,the image synthesis section 30953A refers to the segmentationinformation cFlag (=segMask[x][y]) of a target pixel, the segmentationinformation lFlag (segmask[x−1][y]) of a pixel adjacent on the leftside, and the segmentation information rFlag (segMask[x+1][y]) of apixel adjacent to the right side. In a case where the pieces ofsegmentation information are different, a filter using a weight of 1:2:1to the left pixel p[x−1][y], the target pixel p[x][y], and the rightpixel p[x+1][y] is applied. Subsequently, the image synthesis section30953 refers to segmentation information cFlag (=segMask[x][y]) of atarget pixel, segmentation information lFlag (=segMask[x][y−1]) of apixel adjacent to the top side, and segmentation information rFlag(=segMask[x][y+1]) of a pixel adjacent to the bottom side. In a casewhere the pieces of segmentation information are different, a filterusing a weight of 1:2:1 to the top pixel p[x][y−1], the target pixelp[x][y], and the bottom pixel p[x][y+1] is applied. Pseudocodes of thisprocess are as follows.

for (y = 0; y < nCbSX; y++)  for(x =0; x < nCbSX; x++) { tFlag =segMask[n * x][Max(0, n * (y − 1))] lFlag = segMask[Max(0, (n * (x −1))][n * y] bFlag = segMask[n * x][Min(n * (y + 1), nCbSL − 1)] rFlag =segMask[Min(n * (x + 1), nCbSL − 1)][n * y] cFlag = segMask[n * x][n *y] filt = p[x][y] if ((lFlag || cFlag || rFlag) && (! lFlag || ! cFlag|| ! rFlag)) filt = (p[Max(0, x − 1)][y] + (filt << 1) + p[Min(x + 1,nCbSX − 1)][y]) >> 2 if ((tFlag || cFlag || bFlag) && (! tFlag || !cFlag || ! bFlag))  filt = (p[x][Max(0, y − 1)] + (filt << 1) +p[x][Min(y + 1, nCbSX − 1)]) >> 2 predSamples[x][y] = filt  }

The image synthesis section 309530 according to the comparative exampledetermines whether there is a filter with reference to segmentationinformation segMask[ ][ ] of four points top, bottom, left, and right ofeach pixel of a target block as adjacent pixels, and thereforecomplexity of the determination process is considerable. The imagesynthesis section 309530 applies to two filters (a vertical filter aftera horizontal filter), and therefore complexity of the filters isconsiderable.

The image synthesis section 30953 according to the embodiment (and amodification example to be described below) refers to either thesegmentation information segMask[ ][ ] of two points left and right ofeach pixel of a target block as adjacent pixels (condition A-1) or thesegmentation information segMask[ ][ ] of two points top and bottom ofeach pixels of the target block as adjacent pixels (condition A-2).Therefore, it is possible to obtain the advantageous effect thatcomplexity of the determination of whether there is a filter, comparedto the comparison example in which the determination is executedhorizontally and horizontally twice. The image synthesis section 30953applies the horizontal filter (formula B-1) or the vertical filter(formula B-2) which is one filter. Therefore, it is possible to obtainthe advantageous effect that complexity of the filter is low, comparedto the comparative example in which the filter is applied horizontallyand horizontally twice. The image synthesis section 30953 uses apartition type partMode in regard to the position (disposition ordirection) of segmentation information referred to in the determinationand the position (disposition or direction) of a pixel used for afilter. However, a result already derived by the DBBP partition modederivation section 30954 can be used without change. Therefore, it isnot necessary to newly introduce derivation of the partition modepartMode for a filter of the image synthesis section 30953.

According to experiments of the inventor, while the image synthesissection 30953 according to the embodiment realizes a reduction of aprocessing amount, the image synthesis section 309530 according to thecomparative example can realize coding efficiency of the same degree.

(DBBP Prediction Section 3095A)

A DBBP prediction section 3095A according a modification example isconfigured to include a DBBP image interpolation section 30951, asegmentation section 30952, an image synthesis section 30953A, and aDBBP partition mode derivation section 3094. As in the image synthesissection 30953A or the image synthesis section 30953, a horizontal filteror a vertical filter is applied according to the partition modepartMode. The image synthesis section 30953B is characterized in thatrounding of a filtering process is changed according to the partitionmode partMode. In a case where the partition mode partMode is N×2Nindicates vertical longness, formula B-1 which a rounding constant is 0is used. In a case where the partition mode partMode is 2N×N indicateshorizontal longness, formula B-2A which a rounding constant is 2 isused. The rounding constant is not limited to 2, but an integer equal toor greater than 1 can be used. In particular, to execute the filteringprocess as integer calculation, the rounding constant may be an integerof 1<<(M−1) in a case where right shift is used after weighted additionis used and a case where a right shift amount is M bits. For example,since M=2 in this example, 2 is used as the rounding constant.Pseudocodes of the image synthesis section 30953A are indicated below.

for (y = 0; y < nCbSX; y++)  for (x = 0; x < nCbSX; x++) { cFlag =segMask[n * x][n * y] if (partMode = N×2N) {  lFlag = segMask[Max(0,(n * (x − 1))][n * y]  rFlag = segMask[Min(n * (x + 1), nCbSL − 1)][n *y]  if ((lFlag || cFlag || rFlag) && (! lFlag || ! cFlag || !rFlag)) condition A-1 predSamples[x][y] = (p[Max(0, x − 1)][y] +(p[x][y] << 1) + p[Min(x + 1, nCbSX − 1)][y]) >> 2 formula B-1 } else{// partMode = 2N×N  tFlag = segMask[n * x][Max(0, n * (y − 1))]  bFlag= segMask[n * x][Min(n * (y + 1), nCbSL − 1)]  if ((tFlag || cFlag ||bFlag) && (! tFlag || ! cFlag || ! bFlag)) condition A-2predSamples[x][y] = (p[x][Max(0, y − 1)] + (p[x][y] << 1) + p[x][Min(y +1, nCbSX − 1)] + 2) >> 2 formula B-2A  } }

In general, by using an integer indicating 1<<(M−1) as the integer forthe rounding process in a case where the right shift is M bits at thetime of filtering, it is possible to obtain a high value of highprecision in a case where integer precision is lowered after calculationwith higher precision than the integer precision by 1<<M bits. However,when 1<<(M−1) is used at the time of rounding, there is a problem thatan average component (direct-current component) is overall increasedmore than the original value in a large area in a case where thefiltering process is applied to the large area. Therefore, it is betterto use 0 as the integer for the rounding process in some cases. Apreferable integer for the rounding process is different depending on aregion. When an integer for the rounding process is changed according toa condition as in the image synthesis section 30953B, a preferableinteger can be indirectly selected on the side of the image codingdevice although the integer for the rounding process is not explicitlycoded.

As will be described, in a case where the partition mode partMode isN×2N indicating vertical longness, the DBBP prediction section 3095Aaccording to the modification example uses formula B-1A in which therounding constant is 2 (an integer equal to or greater than 1). In acase where the partition mode partMode is 2N×N indicating horizontallongness, the DBBP prediction section 3095A uses formula B-2 in whichthe rounding constant is 0.

for (y = 0; y < nCbSX; y++)  for (x =0; x < nCbSX; x++) { cFlag =segMask[n * x][n * y] if (partMode = N×2N) {  lFlag = segMask[Max(0,(n * (x − 1))][n * y]  rFlag = segMask[Min(n * (x + 1), nCbSL − 1)][n *y]  if ((lFlag || cFlag || rFlag) && (! lFlag || ! cFlag || !rFlag)) condition A-1 predSamples[x][y] = (p[Max(0, x − 1)][y] +(p[x][y] << 1) + p[Min(x + 1, nCbSX − 1)][y] + 2) >> 2 formula B-1A  }else {// partMode = 2N×N tFlag = segMask[n * x][Max(0, n * (y − 1))]bFlag = segMask[n * x][Min(n * (y + 1), nCbSL − 1)] if ((tFlag || cFlag|| bFlag) && (! tFlag || ! cFlag || !bFlag)) condition A-2 predSamples[x][y] = (p[x][Max(0, y − 1)] + (p[x][y] << 1) +p[x][Min(y + 1, nCbSX − 1)]) >> 2 formula B-2 }  }

The image synthesis section 30953A having the foregoing configurationchanges a value of the rounding constant according to the partitionmode, and therefore it is possible to obtain the advantageous effect ofimproving coding efficiency.

(Image Synthesis Section 30953B)

The DBBP prediction section 3095B according to the modification exampleis configured to include a DBBP image interpolation section 30951, asegmentation section 30952, an image synthesis section 30953B, and aDBBP partition mode derivation section 3094. Hereinafter, the imagesynthesis section 30953 which is a modification example of the imagesynthesis section 30953B will be described. As in the image synthesissection 30953C or the image synthesis section 30953, a horizontal filteror a vertical filter is applied according to the partition modepartMode. The image synthesis section 30953B is characterized in that arounding of a filtering process is changed according to whether a targetpixel (component) is luminance or chroma. Specifically, in a case wherethe target pixel is luminance, 2 is set as the rounding constant. In acase where the target pixel is chroma, 0 is set as the roundingconstant. The rounding constant is not limited to 2, but an integerequal to or greater than 1 can be used. In particular, in a case whereright shift is M bits at the time of filtering, an integer indicating1<<(M−1) is good. For example, since M=2 in this example, 2 is used.Pseudocodes of the image synthesis section 30953B are indicated below.

for (y = 0; y < nCbSX; y++)  for (x = 0; x < nCbSX; x++) { cFlag =segMask[n * x][n * y] if (partMode = N×2N) {  lFlag = segMask[Max(0,(n * (x − 1))][n * y]  rFlag = segMask[Min(n * (x + 1), nCbSL − 1)][n *y]  if ((lFlag || cFlag || rFlag) && (! lFlag || ! cFlag || ! rFlag))condition A-1 predSamples[x][y] = (p[Max(0, x − 1)][y] + (p[x][y] <<1) +p[Min (x + 1, nCbSX − 1)][y] + (cIdx == 0) ? 2 : 0) >> 2 formula B-1B  }else {// partMode = 2N×N tFlag = segMask[n * x][Max(0, n * (y − 1))]bFlag = segMask[n * x][Min(n * (y + 1), nCbSL − 1)] if ((tFlag || cFlag|| bFlag) && (! tFlag || ! cFlag || ! bFlag)) condition A-2 predSamples[x][y] = (p[x][Max(0, y − 1) ] + (p[x][y] << 1) +p[x][Min(y + 1, nCbSX − 1)] + (cIdx == 0) ? 2 : 0) >> 2 formula B-2B } }A process of (cIdx==0) ? 2:0 of formulae B-1B and B-2B is a process ofsetting 2 as the rounding constant in the case of luminance and setting0 as the rounding constant in the case of chroma in which n=2. Anothervariable (here n) changed according to luminance or chroma may be usedor switched. For example, when (n==1) ? 2:0 is used instead of (cIdx==0)? 2:0, 2 is used as the rounding constant because of n=1 in the case ofluminance and 0 is used as the rounding constant because of n=2 in thecase of chroma.

The DBBP prediction section 3095B according to the modification examplemay set 0 as the rounding constant in a case where the target pixel isluminance and may set 2 as the rounding constant in a case where thetarget pixel is chroma as in the following pseudocodes.

for (y = 0; y < nCbSX; y++)  for (x =0; x < nCbSX; x++) { cFlag =segMask[n * x][n * y] if (partMode = N×2N) {  lFlag = segMask[Max(0,(n * (x − 1))][n * y]  rFlag = segMask[Min(n * (x + 1), nCbSL − 1)][n *y]  if ((lFlag || cFlag || rFlag) && (!lFlag || ! cFlag || ! rFlag))condition A-1  predSamples[x][y] = (p[Max(0, x − 1)][y] + (p[x][y]<< 1) + p[Min(x + 1, nCbSX − 1)][y] + (cIdx == 0) ? 0 : 2) >> 2 } else{// partMode = 2N×N  tFlag = segMask [n * x][Max(0, n * (y − 1))]  bFlag= segMask[n * x][Min(n * (y + 1), nCbSL − 1)]  if((tFlag || cFlag ||bFlag) && (!tFlag || ! cFlag || ! bFlag)) condition A-2predSamples[x][y]= (p[x][Max(0, y − 1)] + (p[x][y]<< 1) + p[x][Min(y +1, nCbSX − 1)] + (cIdx == 0) ? 0 : 2) >> 2  } }A process of (cIdx==0) ? 0:2 is a process of setting 0 as the roundingconstant in the case of luminance and setting 2 as the rounding constantin the case of chroma in which n=2.

When an integer for the rounding process is changed according to acondition as in the image synthesis section 30953B, a preferable integercan be indirectly selected on the side of the image coding devicealthough the integer for the rounding process is not explicitly coded.

The image synthesis section 30953B having the foregoing configurationchanges a value of the rounding constant according to luminance orchroma, and therefore it is possible to obtain the advantageous effectof improving coding efficiency.

(DBBP Partition Mode Derivation Section 30954)

The DBBP partition mode derivation section 30954 derives the partitionmode partMode from the depth block refSamples corresponding to a targetblock. Specifically, sums partSum[0], partSum[1], partSum[2],partSum[3], partSum[4], and partSum[5] corresponding to N×2N(SIZE_N×2N), 2N×N (SIZE_2N×N), 2N×nU (SIZE_2N×nU), 2N×nD (SIZE_2N×nD),nL×2N (SIZE_nL×2N), nR×2N (SIZE_nR×2N) which are partition modes inwhich 2N×2N are partitioned into two pieces as partition modes PartModeas in the following formula based on the segmentation informationsegMask derived from the depth block refSamples are derived based on thefollowing pseudocodes at x and y (x=0 . . . nCbS−1, y=0 . . . nCbS−1) ofthe target block.

for (y = 0; y < nCbS; y ++)  for (x = 0; x < nCbS; x ++) { segFlag =segMask[x][y] partSum[0][(x < (nCbS >> 1)) ? segFlag :! segFlag]++partSum[1][ (y < (nCbS >> 1)) ? segFlag :! segFlag]++ if (nCbS > 8) { partSum[2][(y < (nCbS >> 2)) ? segFlag :! segFlag]++  partSum[3][(y <(nCbS >> 2 + nCbS >> 1)) ? segFlag :! segFlag]++  partSum[4][(x <(nCbS >> 2)) ? segFlag :! segFlag ]++  partSum[5][(x < (nCbS >> 2 +nCbS >> 1)) ? segFlag :! segFlag ]++ }  }

Further, the DBBP partition mode derivation section 30954 derive p inwhich partSum[p] is maximum in p=0 . . . 5 and derives the partitionmode corresponding to p on the assumption that p=0 . . . 5 correspondsto SIZE_N×2N, SIZE_2N×N, SIZE_2N×nU, SIZE_2N×nD, SIZE_nL×2N, SIZE_nR×2N.For example, in a case of p=0, SIZE_N×2N is obtained.

partIdc = 0 maxPartSum = 0 for (p = 0; p < 6; p++)  for (i = 0; i < 2;i++) { if (partSum[p][i] > maxPartSum) {  maxPartSum = partSum[p][i] partIdc = p }  }In the DBBP prediction section 3095 described above and the DBBPprediction section 3095A and the DBBP prediction section 3095B accordingto the modification examples, the following DBBP partition modederivation section 30954A and DBBP partition mode derivation section30954B can be used instead of the DBBP partition mode derivation section30954.

(DBBP Partition Mode Derivation Section 30954A)

The DBBP partition mode derivation section 30954A derives p in whichpartSum[p] is maximum in p=0 . . . 1 and derives the partition modecorresponding to p on the assumption that p=0 . . . 1 corresponds toSIZE_N×2N and SIZE_2N×N.

partIdc = 0 maxPartSum = 0 for (p = 0; p < 2; p++)  for (i = 0; i < 2;i++) { if (partSum[p][i] > maxPartSum) {  maxPartSum = partSum[p][i] partIdc = p }  }

The DBBP partition mode derivation section 30954A sets only twopartition modes N×2N and 2N×N of symmetric partition as targets withoutderiving asymmetric partition (AMP partition, SIZE_2N×nU, SIZE_2N×nD,SIZE_nL×2N, and SIZE_nR×2N) as the partition mode.

(DBBP Prediction Section 3095B)

The DBBP partition mode derivation section 30954B decides the partitionmode PartMode with reference to only four corner pixels of a targetblock of refSamples (hereinafter referred to as refDepPels)corresponding to the target block, as illustrated in FIG. 13.

Specifically, coordinates xP0, xP0, yP0, and yP1 corresponding to thetop left coordinate (xP0, yP0), the top right coordinates (xP1, yP0),the bottom left coordinates (xP0, xP1) and the bottom right coordinates(xP1, yP1) are derived by the following formulae.

xP0=Clip3(0,pic_width_in_luma_samples−1,xTL);

yP0=Clip3(0,pic_height_in_luma_samples−1,yTL);

xP1=Clip3(0,pic_width_in_luma_samples−1,xTL+nPSW−1); and

yP1=Clip3(0,pic_height_in_luma_samples−1,yTL+nPSH−1).

Further, the splitting flag horSplitFlag is derived by the followingformula from comparison (refDepPels[xP0][yP0]<refDepPels[xP1][yP1])between the top left pixel TLrefDepPels[xP0][yP0] and the bottom rightpixel BR and comparison (refDepPels[xP1][yP0]<refDepPels[xP0][yP1])between the bottom left pixel BLrefDepPels[xP0][yP0] and the top rightpixel TR.

horSplitFlag=(refDepPels[xP0][yP0]<refDepPels[xP1][yP1])==(refDepPels[xP1][yP0]<refDepPels[xP0][yP1])).

The DBBP partition mode derivation section 30954B allocates 2N′ N or N′2N according to the splitting flag horSplitFlag. Specifically, thepartition mode PartMode is derived by allocating 2N′ N in a case wherehorSplitFlag is 1 and by allocating N′ 2N in a case where horSplitFlagis 0.

(Configuration of Image Coding Device)

Next, the configuration of the image coding device 11 according to theembodiment will be described. FIG. 22 is a block diagram illustratingthe configuration of an image coding device 11 according to theembodiment. The image coding device 11 is configured to include thepredicted image generation section 101, a subtraction section 102, a DCTand quantization section 103, an entropy coding section 104, an inversequantization and inverse DCT section 105, an addition section 106, aprediction parameter memory (a prediction parameter storage section or aframe memory) 108, a reference picture memory (a reference image storagesection or a frame memory) 109, a coding parameter decision section 110,and a prediction parameter coding section 111. The prediction parametercoding section 111 is configured to include an inter-predictionparameter coding section 112 and an intra-prediction parameter codingsection 113.

The predicted image generation section 101 generates the predictedpicture block predSamples for each block which is a region separatedfrom each picture in regard to the picture at each viewpoint of thelayer image T input from the outside. Here, the predicted imagegeneration section 101 reads the reference picture block from thereference picture memory 109 based on the prediction parameter inputfrom the prediction parameter coding section 111. The predictionparameter input from the prediction parameter coding section 111 is, forexample, the motion vector or the disparity vector. The predicted imagegeneration section 101 reads the reference picture block of the blocklocated at a position indicated by the motion vector or the disparityvector predicated using a coding prediction unit as an origin. Thepredicted image generation section 101 generates the predicted pictureblock predSamples using one prediction scheme among a plurality ofprediction schemes in regard to the read reference picture block. Thepredicted image generation section 101 outputs the generated predictedpicture block predSamples to the subtraction section 102 and theaddition section 106. Since the operation of the predicted imagegeneration section 101 is the same as the operation of the predictedimage generation section 308 described above, the details of thegeneration of the predicted picture block predSamples will be omitted.

To select the prediction scheme, the predicted image generation section101 selects, for example, a prediction scheme in which an error valuebased on a difference between a signal value for each pixel of the blockincluded in the layer image and a signal value for each pixelcorresponding to the predicted picture block predSamples is the minimum.The method of selecting the prediction scheme is not limited thereto.

When a coding target picture is a base view picture, the plurality ofprediction schemes are intra-prediction, motion prediction, and mergeprediction. The motion prediction is display inter-temporal predictionamong the above-described inter-prediction. The merge prediction isprediction in which the same reference picture block as a block which isthe already coded block and is a block within a pre-decided range fromthe prediction unit and the prediction parameters are used. In a casewhere the coding target picture is a picture other than the base viewpicture, the plurality of prediction schemes are intra-prediction,motion prediction, a merge mode (including viewpoint synthesisprediction), and disparity prediction. The disparity prediction(parallax prediction) is prediction between different layer images(different viewpoint images) in the above-described inter-prediction. Inthe disparity prediction (parallax prediction), there are prediction ina case where the additional prediction (the residual prediction and theillumination compensation) is executed and prediction when theadditional prediction is not executed.

In a case where the intra-prediction is selected, the predicted imagegeneration section 101 outputs the prediction mode predMode indicatingthe intra-prediction mode used at the time of the generation of thepredicted picture block predSamples to the prediction parameter codingsection 111.

In a case where the motion prediction is selected, the predicted imagegeneration section 101 stores the motion vector mvLX used at the time ofthe generation of the predicted picture block predSamples in theprediction parameter memory 108 and outputs the motion vector mvLX tothe inter-prediction parameter coding section 112. The motion vectormvLX indicates a vector from the position of the coding prediction unitto the position of the reference picture block at the time of thegeneration of the predicted picture block predSamples. Informationindicating the motion vector mvLX includes information (for example, thereference picture index refIdxLX or the picture order number POC)indicating the reference picture and may indicate the predictionparameter. The predicted image generation section 101 outputs aprediction mode PredMode indicating the inter-prediction mode to theprediction parameter coding section 111.

In a case where the disparity prediction is selected, the predictedimage generation section 101 stores the disparity vector used at thetime of the generation of the predicted picture block predSamples in theprediction parameter memory 108 and outputs the disparity vector to theinter-prediction parameter coding section 112. The disparity vector dvLXindicates a vector from the position of the coding prediction unit tothe position of the reference picture block at the time of thegeneration of the predicted picture block predSamples. Informationindicating the disparity vector dvLX includes information (for example,the reference picture index refIdxLX or the view ID view id) indicatingthe reference picture and may indicate the prediction parameter. Thepredicted image generation section 101 outputs a prediction modepredMode indicating the inter-prediction mode to the predictionparameter coding section 111.

In a case where the merge mode is selected, the predicted imagegeneration section 101 outputs the merge index merge_idx indicating theselected reference picture block to the inter-prediction parametercoding section 112. Further, the predicted image generation section 101outputs a prediction mode predMode indicating the merge mode to theprediction parameter coding section 111.

In a case where the VSP mode flag VspModeFlag indicates that thepredicted image generation section 101 executes the viewpoint synthesisprediction in the merge mode described above, the VSP prediction section30374 included in the predicted image generation section 101, asdescribed above, executes the viewpoint synthesis prediction. In a casewhere the residual prediction execution flag resPredFlag indicates thatthe predicted image generation section 101 executes the residualprediction, the residual prediction section 3092 included in thepredicted image generation section 101, as described above, executes theresidual prediction.

The subtraction section 102 generates a residual signal by subtracting asignal value of the predicted picture block predSamples input from thepredicted image generation section 101 for each pixel from a signalvalue of the block corresponding to the layer image T input from theoutside. The subtraction section 102 outputs the generated residualsignal to the DCT and quantization section 103 and the coding parameterdecision section 110.

The DCT and quantization section 103 executes DCT on the residual signalinput from the subtraction section 102 to calculate a DCT coefficient.The DCT and quantization section 103 quantizes the calculated DCTcoefficient to obtain a quantization coefficient. The DCT andquantization section 103 outputs the obtained quantization coefficientto the entropy coding section 104 and the inverse quantization andinverse DCT section 105.

The quantization coefficient is input from the DCT and quantizationsection 103 to the entropy coding section 104 and the coding parametersare input from the coding parameter decision section 110 to the entropycoding section 104. As the input coding parameters, for example, thereare codes such as the reference picture index refIdxLX, the predictionvector flag mvp_LX_flag, the difference vector mvdLX, the predictionmode PredMode, the merge index merge_idx, the residual prediction indexiv_res_pred_weight_idx, and the illumination compensation flag ic_flag.

The entropy coding section 104 executes entropy coding on the inputquantization coefficient and coding parameters to generate the codedstream Te and outputs the generated coded stream Te to the outside.

The inverse quantization and inverse DCT section 105 executes inversequantization on the quantization coefficient input from the DCT andquantization section 103 to obtain a DCT coefficient. The inversequantization and inverse DCT section 105 executes the inverse DCT on theobtained DCT coefficient to calculate a decoding residual signal. Theinverse quantization and inverse DCT section 105 outputs the calculateddecoding residual signal to the addition section 106 and the codingparameter decision section 110.

The addition section 106 adds a signal value of the predicted pictureblock predSamples input from the predicted image generation section 101and a signal value of the decoding residual signal input from theinverse quantization and inverse DCT section 105 for each pixel togenerate a reference picture block. The addition section 106 stores thegenerated reference picture block in the reference picture memory 109.

The prediction parameter memory 108 stores the prediction parametergenerated by the prediction parameter coding section 111 at a positiondecided in advance for each coding target picture and block.

The reference picture memory 109 stores the reference picture blockgenerated by the addition section 106 at a position decided in advancefor each coding target picture and block.

The coding parameter decision section 110 selects one set from aplurality of sets of coding parameters. The coding parameters are theabove-described prediction parameters or parameters which are codingtargets generated in association with the prediction parameters. Thepredicted image generation section 101 generates the predicted pictureblock predSamples using each set of coding parameters.

The coding parameter decision section 110 calculates a cost valueindicating the size of an information amount or a coding error in eachof the plurality of sets. The cost value is, for example, a sum of thecoding amount and a value obtained by multiplying a squared error by acoefficient X. The coding amount is an information amount of the codedstream Te obtained by executing the entropy coding on a quantized errorand the coding parameter. The squared error is a total sum of squaredvalues of residual values of residual signals calculated in thesubtraction section 102 between the pixels. The coefficient λ is alarger real number than preset zero. The coding parameter decisionsection 110 selects the set of coding parameters for which thecalculated cost value is the minimum. In this way, the entropy codingsection 104 outputs the selected set of coding parameters as the codedstream Te to the outside and does not output the unselected set ofcoding parameters.

The prediction parameter coding section 111 derives the predictionparameters used at the time of the generation of the predicted picturebased on the parameter input from the predicted image generation section101 and codes the derived prediction parameter to generate the set ofcoding parameters. The prediction parameter coding section 111 outputsthe generated set of coding parameters to the entropy coding section104.

The prediction parameter coding section 111 stores the predictionparameter corresponding to the set of coding parameters selected by thecoding parameter decision section 110 among the generated sets of codingparameters in the prediction parameter memory 108.

In a case where the prediction mode PredMode input from the predictedimage generation section 101 is the inter-prediction mode, theprediction parameter coding section 111 causes the inter-predictionparameter coding section 112 to operate. In a case where the predictionmode PredMode indicates the intra-prediction mode, the predictionparameter coding section 111 causes the intra-prediction parametercoding section 113 to operate.

The inter-prediction parameter coding section 112 derives theinter-prediction parameter based on the prediction parameter input fromthe coding parameter decision section 110. The inter-predictionparameter coding section 112 has the same configuration as theconfiguration in which the inter-prediction parameter decoding section303 derives the inter-prediction parameter as the configuration in whichthe inter-prediction parameter is derived. The configuration of theinter-prediction parameter coding section 112 will be described below.

The intra-prediction parameter coding section 113 decides anintra-prediction mode IntraPredMode indicated by the prediction modePredMode input from the coding parameter decision section 110 as the setof inter-prediction parameter.

(Configuration of Inter-Prediction Parameter Coding Section)

Next, the configuration of the inter-prediction parameter coding section112 will be described. The inter-prediction parameter coding section 112is means corresponding to the inter-prediction parameter decodingsection 303. FIG. 23 is a schematic diagram illustrating theconfiguration of the inter-prediction parameter coding section 112according to the embodiment. The inter-prediction parameter codingsection 112 is configured to include a merge mode parameter derivationsection 1121, an AMVP prediction parameter derivation section 1122, asubtraction section 1123, and an inter-prediction parameter codingcontrol section 1126.

The merge mode parameter derivation section 1121 has the sameconfiguration as the above-described merge mode parameter derivationsection 3036 (see FIG. 9).

The AMVP prediction parameter derivation section 1122 has the sameconfiguration as the above-described AMVP prediction parameterderivation section 3032 (see FIG. 10).

The subtraction section 1123 subtracts the prediction vector mvpLX inputfrom the AMVP prediction parameter derivation section 1122 from thevector mvLX input from the coding parameter decision section 110 togenerate the difference vector mvdLX. The difference vector mvdLX isoutput to the inter-prediction parameter coding control section 1126.

The inter-prediction parameter coding control section 1126 instructs theentropy coding section 104 to codes codes (syntax elements) related tothe inter-prediction and codes codes (the syntax elements) included inthe coded data, for example, the partition mode part_mode, the mergeflag merge_flag, the merge index merge_idx, the inter-predictionidentifier inter_pred_idc, the reference picture index refIdxLX, theprediction vector flag mvp_LX_flag, and the difference vector mvdLX.

The inter-prediction parameter coding control section 1126 is configuredto include a residual prediction index coding section 10311, aillumination compensation flag coding section 10312, a merge indexcoding section, a vector candidate index coding section, a partitionmode coding section, a merge flag coding section, an inter-predictionidentifier coding section, a reference picture index coding section, anda vector difference coding section. The partition mode coding section,the merge flag coding section, the merge index coding section, theinter-prediction identifier coding section, the reference picture indexcoding section, the vector candidate index coding section, and thevector difference coding section code the partition mode part_mode, themerge flag merge_flag, the merge index merge_idx, the inter-predictionidentifier inter_pred_idc, the reference picture index refIdxLX, theprediction vector flag mvp_LX_flag, and the difference vector mvdLX.

The residual prediction index coding section 10311 codes the residualprediction index iv_res_pred_weight_idx to indicate whether to executeresidual prediction.

The illumination compensation flag coding section 10312 codes theillumination compensation flag ic_flag to indicate whether to executeillumination compensation.

In a case where the prediction mode PredMode input from the predictedimage generation section 101 is the merge mode, the inter-predictionparameter coding control section 1126 outputs the merge index merge_idxinput from the coding parameter decision section 110 to the entropycoding section 104 so that the merge index merge_idx is coded.

The inter-prediction parameter coding control section 1126 executes thefollowing processes in the case where the prediction mode PredMode inputfrom the predicted image generation section 101 is the inter-predictionmode.

The inter-prediction parameter coding control section 1126 unifies thereference picture index refIdxLX and the prediction vector flagmvp_LX_flag input from the coding parameter decision section 110 and thedifference vector mvdLX input from the subtraction section 1123. Theinter-prediction parameter coding control section 1126 outputs theunified code to the entropy coding section 104 so that the code iscoded. The inter-prediction parameter coding control section 1126includes a DBBP flag coding section 11263 (not illustrated).

The predicted image generation section 101 is means corresponding to theabove-described predicted image generation section 308 and a process ofgenerating a predicted image from the prediction parameter is the same.

In the embodiment, the predicted image generation section 101 includesthe above-described residual synthesis section 30923 according to theembodiment, as in the predicted image generation section 308. That is,in a case where the size of a target block (prediction block) is equalto or less than a predetermined size, the residual prediction is notexecuted. The predicted image generation section 101 executes theresidual prediction only in a case where the partition mode part_mode ofthe coding unit CU is 2N×2N. That is, the residual prediction indexiv_res_pred_weight_idx is processed as 0. The residual prediction indexcoding section 10311 according to the embodiment codes the residualprediction index iv_res_pred_weight_idx only in a case where thepartition mode part_mode of the coding unit CU is 2N×2N.

The image coding device including the residual prediction section 3092codes the residual prediction index in a case where the partition modeof the coding unit including a target block is 2N×2N in the image codingdevice including the residual prediction index coding section coding theresidual prediction index. In other cases, the residual prediction indexis not coded. In a case where the residual prediction index is a valueother than 0, the residual prediction is executed.

(DBBP Prediction)

The predicted image generation section 101 included in the image codingdevice 11 according to the embodiment includes the DBBP predictionsection 3095. Since the details of the operation of the DBBP predictionsection 3095 have been described above, the description thereof will beomitted. The DBBP prediction section 3095 executes depth-based blockprediction in a case where the above-described DBBP flag coding section11263 codes 1 as the DBBP flag dbbp_flag.

In the image coding device including the DBBP prediction section 3095(the image synthesis section 30953) having the above-describedconfiguration and the DBBP prediction section 3095A and the DBBPprediction section 3095B according to the modification examples, one ofthe segmentation information segMask[ ][ ] of adjacent pixels of tworight and left points of each pixel of a target block (condition A-1)and the segmentation information segMask[ ][ ] of two adjacent pixels oftop and bottom points (condition A-2) is referred to. Therefore, it ispossible to obtain the advantageous effect that complexity of thedetermination of whether there is a filter, compared to the comparisonexample in which the determination is executed horizontally andhorizontally twice. The image synthesis section 30953 applies thehorizontal filter (formula B-1) or the vertical filter (formula B-2)which is one filter. Therefore, it is possible to obtain theadvantageous effect that complexity of the filter is low, compared tothe comparative example in which the filter is applied horizontally andhorizontally twice. The image synthesis section 30953 uses a partitiontype partMode in regard to the position (disposition or direction) ofsegmentation information referred to in the determination and theposition (disposition or direction) of a pixel used for a filter.However, a result already by the DBBP partition mode derivation section30954 can be used without change. Therefore, it is not necessary tonewly introduce derivation of the partition mode partMode for a filterof the image synthesis section 30953.

In the image coding device including the DBBP prediction section 3095A,the rounding constant of the filtering process is changed according tothe partition mode. Therefore, it is possible to improve codingefficiency.

In the image coding device including the DBBP prediction section 3095B,the rounding constant of the filtering process is changed according towhether the target pixel is luminance or chroma. Therefore, it ispossible to improve coding efficiency.

Parts of the image coding device 11 and the image decoding device 31according to the above-described embodiment, for example, the entropydecoding section 301, the prediction parameter decoding section 302, thepredicted image generation section 101, the DCT quantization section103, the entropy coding section 104, the inverse quantization andinverse DCT section 105, the coding parameter decision section 110, andthe prediction parameter coding section 111, the entropy decodingsection 301, the prediction parameter decoding section 302, thepredicted image generation section 308, and the inverse quantization andinverse DCT section 311 may be realized by a computer. In this case, aprogram realizing the control function may be recorded on acomputer-readable recording medium and the program recorded on therecording medium may be read and executed in to a computer system to berealized. The “computer system” mentioned here is a computer systemincluded in one of the image coding device 11 and the image decodingdevice 31 and includes an OS and hardware such as peripheral apparatus.The “computer-readable recording medium” refers to a portable mediumsuch as a flexible disk, a magneto-optical disc, a ROM, or a CD-ROM or astorage device such as a hard disk included in a computer system. The“computer-readable recording medium” may also include a medium retaininga program dynamically for a short time, such as a communication linewhen a program is transmitted via a network such as the Internet or acommunication circuit line such as a telephone circuit and a mediumretaining a program for a given time, such as a volatile memory includedin a computer system serving as a server or a client in this case. Theprogram may be a program used to realize some of the above-describedfunctions or may be a program combined with a program already stored ina computer system to realize the above-described functions.

Some or all of the image coding device 11 and the image decoding device31 according to the above-described embodiment may be realized as anintegrated circuit such as large scale integration (LSI). Each of thefunctional blocks of the image coding device 11 and the image decodingdevice 31 may be individually formed as a processor or some or all ofthe functional blocks may be integrated to be formed as a processor. Amethod for an integrated circuit is not limited to the LSI, but may berealized by a dedicated circuit or a general processor. When anintegrated circuit technology substituting the LSI with an advance insemiconductor technologies appears, an integrated circuit may be used bythe technology.

The embodiment of the invention has been described above in detail withreference to the drawings, but a specific configuration is not limitedto the above-described configuration. The invention can be modified invarious forms within the scope of the invention without departing fromthe gist of the invention.

CONCLUSION

According to an aspect of the invention, a predicted image generationdevice includes: a segmentation derivation section that derivessegmentation information from an image; and an image synthesis sectionthat generates a predicted image. The image synthesis section executes afiltering process based on a partition mode and the segmentationinformation.

According to the aspect of the invention, the image synthesis sectionmay determine whether to execute the filtering process with reference tothe segmentation information located in a horizontal direction of atarget pixel in a case where the partition mode is a vertically longblock, and may determine whether to execute the filtering process withreference to the segmentation information located in a verticaldirection of the target pixel in a case where the partition mode is ahorizontally long block.

According to the aspect of the invention, the image synthesis sectionmay determine whether to execute the filtering process with reference tothe segmentation information located in a horizontal direction of atarget pixel in a case where the partition mode is N×2N, and maydetermine whether to execute the filtering process with reference to thesegmentation information located in a vertical direction of the targetpixel in a case where the partition mode is 2N×N.

According to the aspect of the invention, the image synthesis sectionmay execute the filtering process with reference to a target pixel andpixels located in a horizontal direction of the target pixel in a casewhere the partition mode is a vertically long block, and may execute thefiltering process with reference to the target pixel and pixels locatedin a vertical direction of the target pixel in a case where thepartition mode is a horizontally long block.

According to the aspect of the invention, the image synthesis sectionmay execute the filtering process with reference to the target pixel andthe pixels located in the horizontal direction of the target pixel in acase where the partition mode is N×2N, and may execute the filteringprocess with reference to the target pixel and pixels located in avertical direction of the target pixel in a case where the partitionmode is 2N×N.

According to the aspect of the invention, the image synthesis sectionmay execute the filtering process by setting a right shifted value froma product sum of c, r, and l with reference to a target pixel c, a pixell located on a left side of the target pixel, and a pixel r located on aright side of the target pixel as an output pixel in the case where thepartition mode is the vertically long block and by setting a rightshifted value from the product sum of c, t, and b with reference to thetarget pixel c, a pixel t located on a top side of the target pixel, anda pixel b located on a bottom side of the target pixel as an outputpixel in the case where the partition mode is the horizontally longblock.

According to the aspect of the invention, the image synthesis sectionmay execute the filtering process by setting (l+2*c+r)>>2 as an outputpixel in the right adjacent pixel l, the target pixel c, and the leftadjacent pixel r in the case where the partition mode is the verticallylong block and by setting (t+2*c+b)>>2 as an output pixel in the topadjacent pixel t, the target pixel c, and the bottom adjacent pixel b inthe case where the partition mode is the horizontally long block.

According to another aspect of the invention, an image decoding deviceincludes the predicted image generation device and a DBBP flag decodingsection. The predicted image generation device executes DBBP predictionin a case where a DBBP flag is 1.

According to still another aspect of the invention, an image codingdevice includes the predicted image generation device and a DBBP flagcoding section. The predicted image generation device executes DBBPprediction in a case where a DBBP flag is 1.

INDUSTRIAL APPLICABILITY

The invention can be appropriately applied to an image decoding devicethat decodes coded data in which image data is coded and an image codingdevice that generates coded data in which image data is coded. Theinvention can be appropriately applied to a data structure of coded datathat is generated by the image coding device and is referred to by theimage decoding device.

REFERENCE SIGNS LIST

-   1 image transmission system-   11 image coding device-   101 predicted image generation section-   102 subtraction section-   103 DCT and quantization section-   10311 residual prediction index coding section-   10312 illumination compensation flag coding section-   104 entropy coding section-   105 inverse quantization and inverse DCT section-   106 addition section-   108 prediction parameter memory (frame memory)-   109 reference picture memory (frame memory)-   110 coding parameter decision section-   111 prediction parameter coding section-   112 inter-prediction parameter coding section-   1121 merge mode parameter derivation section-   1122 AMVP prediction parameter derivation section-   1123 subtraction section-   1126 inter-prediction parameter coding control section-   113 intra-prediction parameter coding section-   21 network-   31 image decoding device-   301 entropy decoding section-   302 prediction parameter decoding section-   303 inter-prediction parameter decoding section-   3031 inter-prediction parameter decoding control section-   30311 partition mode decoding section-   30312 inter-prediction identifier decoding section-   30313 DBBP flag decoding section-   3032 AMVP prediction parameter derivation section-   3035 addition section-   3036 merge mode parameter derivation section-   30361 merge candidate derivation section-   303611 merge candidate storage section-   30362 merge candidate selection section-   30370 enhancement merge candidate derivation section-   30371 inter-layer merge candidate derivation section-   30373 disparity merge candidate derivation section-   30374 VSP merge candidate derivation section (VSP prediction    section, viewpoint synthesis prediction means, partition splitting    section, depth vector derivation section)-   30380 base merge candidate derivation section-   30381 spatial merge candidate derivation section-   30382 temporal merge candidate derivation section-   30383 coupled merge candidate derivation section-   30384 zero merge candidate derivation section-   304 intra-prediction parameter decoding section-   306 reference picture memory (frame memory)-   307 prediction parameter memory (frame memory)-   308 predicted image generation section-   309 inter-predicted image generation section-   3091 motion disparity compensation section-   3092 residual prediction section-   30922 reference image interpolation section-   30923 residual synthesis section-   30924 residual prediction vector derivation section-   3093 illumination compensation section-   3095, 3095A, 3095B DBBP prediction section (depth-based block    predicted image generation device)-   30951 DBBP image interpolation section (image interpolation section,    image interpolation means)-   30952 segmentation section-   30953, 30953A, 30953B image synthesis section-   30954, 30954A, 30954B DBBP partition mode derivation section (depth    partition mode derivation means)-   3096 weight prediction section-   310 intra-predicted image generation section-   311 inverse quantization and inverse DCT section-   312 addition section-   351 depth DV derivation section-   352 disparity vector derivation section-   353 partition mode derivation section-   41 image display apparatus

1. A predicted image generation device comprising: a segmentationsection that derives segmentation information of a target block; and animage synthesis section that generates a predicted image using thesegmentation information, wherein the image synthesis section generatesthe predicted image by performing one of at least a first filteringprocess and a second filtering process according to a value of apartition mode of the target block, wherein one of the at least thefirst filtering process and the second filtering process includes ashifting process of a target pixel.
 2. An image decoding devicecomprising: the predicted image generation device according to claim 1;and a Depth-based Block Partitioning (DBBP) flag decoding section,wherein the predicted image generation device executes DBBP predictionin a case that a value of a DBBP flag is equal to one.
 3. An imageencoding device comprising: the predicted image generation deviceaccording to claim 1; and a Depth-based Block Partitioning (DBBP) flagencoding section, wherein the predicted image generation device executesDBBP prediction in a case that a value of a DBBP flag is equal to one.